I seem to be experiencing a behavior on Framework 1.0 sp2 RegistryKey
class where the class is not releasing/closing named pipe winreg
handles to remote machines. The process continues to hold on to a
handle to the following pipe:
\Device\LanmanRedirector\<MACHINE>\PIPE\winreg
Even after explicitly calling Close() (which, according to the docs,
should not matter for a base key), and expliticly doing garbage
collections, I cannot seem to get rid of this pipe.
My app is accessing the registry on thousands of machines and is long
running, and this is not a desired behavior. Any thoughts/help?
example code:
RegistryKey rk = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMa chine,
MACHINE) ;
rk.Close();
rk=null;
GC.Collect();
GC.Collect(); // just to allow finalizers, etc.
GC.Collect();
// using tools like SysInternal's Process Explorer shows the winreg
pipe to still be open