Thursday, May 14, 2009 #

Hunting .NET memory leaks is like playing Whack-A-Mole

We have a .NET memory leak in our GUI application and though I have tried a few commercial tools (RedGate and AutomatedQA) I find that there is just too much information and I find that I can't see the wood for the trees. So my tool of use is good old WinDbg and the SOS2 extension.

In the end I narrowed the main leak to a private static collection in a 3rd party library - which required the use of reflection to make it let go. Now to hunt the other ones down...

References (mainly for me actually):
John Robbins -
http://msdn.microsoft.com/en-us/magazine/cc163833.aspx
Tess Ferrandez - http://blogs.msdn.com/tess
Prashant Sinha - http://debuggingblog.com/wp/

PS - I'd like to say use Google but there is so much screen scraped rubbish out there I kept coming across the same stuff. over and over again.

 

 

posted @ Thursday, May 14, 2009 2:34 PM | Feedback (1)