T
TC
I need help fixing a memory leak. I've done a lot of research, but
most information is aimed at finding leaks, not at fixing them. I've
found the leak; I just don't know how to fix it.
In my project, I have a reference to a third-party .NET class library.
My application needs to create an instance of a class about every two
minutes, then discard it a short time later. I've found, however, that
each cycle causes my application to grow about 3 kb. The class does
not implement IDisposable, so I'm cleaning it up by setting the
variable = Nothing.
After the class is instantiated, I need to call a specific method
about 200 times. I've found that each time I call the method, my
application grows about 1 kb. This is a real killer. After a few days
of operation, I get an Out of Memory exception.
From my research, I've learned that the leak is affecting the
unmanaged memory heap. The problem is clearly in the third-party class
library. What can I do about it?
-TC
most information is aimed at finding leaks, not at fixing them. I've
found the leak; I just don't know how to fix it.
In my project, I have a reference to a third-party .NET class library.
My application needs to create an instance of a class about every two
minutes, then discard it a short time later. I've found, however, that
each cycle causes my application to grow about 3 kb. The class does
not implement IDisposable, so I'm cleaning it up by setting the
variable = Nothing.
After the class is instantiated, I need to call a specific method
about 200 times. I've found that each time I call the method, my
application grows about 1 kb. This is a real killer. After a few days
of operation, I get an Out of Memory exception.
From my research, I've learned that the leak is affecting the
unmanaged memory heap. The problem is clearly in the third-party class
library. What can I do about it?
-TC