473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Handle/Memory Leak in RegistryKey Class?

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
Jul 21 '05 #1
0 4059

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeremy Lemaire | last post by:
Hello, I am working on cross platform code that is displaying a huge memory leak when compiled on 11.00 HPUX using the aCC -AA flag. It is not leaking on NT, LINUX, Solaris, or HPUX without the...
0
by: Kong Li | last post by:
Follow up to this thread, the latest Oracle 9i release 2 patchset (9.2.0.5) fixed the handle count leak problem. The problem is in Oracle client component. Thanks. Kong ----- From: Kong...
3
by: Brad Moore | last post by:
Hey All, I need help with debugging some code, if this isn't the correct newsgroup to ask in, disregard this message. I'm having difficulty pinpointing a memory leak in my code, I believe it...
32
by: John | last post by:
Hi all: When I run my code, I find that the memory that the code uses keeps increasing. I have a PC with 2G RAM running Debian linux. The code consumes 1.5G memory by the time it finishes...
4
by: Morten Aune Lyrstad | last post by:
Ok, now I'm officially confused. I have a large project going, which uses a win32 ui library I am developing myself. And I'm getting weird memory leaks. I don't know if I can explain what is going...
20
by: jeevankodali | last post by:
Hi I have an .Net application which processes thousands of Xml nodes each day and for each node I am using around 30-40 Regex matches to see if they satisfy some conditions are not. These Regex...
0
by: geek_in_a_box | last post by:
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...
12
by: Grahamo | last post by:
Hey, this is related to absolutely nothing in particular and is of no importance whatsoever except for my curiousity. Does anybody have an example of a particularly tricky memory leak that's...
23
by: James | last post by:
The following code will create memory leaks!!! using System; using System.Diagnostics; using System.Data; using System.Data.SqlClient; namespace MemoryLeak
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.