.NET Tool for Tracking down managed memory leaks
Leak Detector drives the debugger process, parses the output, and provides an easy way to explore an application’s heap.
Random thoughts about .Net development
Leak Detector drives the debugger process, parses the output, and provides an easy way to explore an application’s heap.
With the tool installed, you just type "clip <shortcutname>"
in the MSN Deskbar. For example:
clip blog
And "MSN Deskbar Clip" puts the URL that "blog" refers to on to the clipboard.
This is really useful for long URLs (such as pointers to MSDN articles, products on Amazon etc.)
Step 1: Run your process and put it in the state you are curious about
Step 2: Use tasklist to find its process ID
Step 3: Use VADump to get a summary of the process
Step 4: Attach Windbg and load SOS
Step 5: Get the CLR memory summary
Step 6: Dump Type Specific Information
Step 7: Identify the roots of suspected leaks
List of features
Difference between Dispose(true) and Dispose(false)?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconimplementingdisposemethod.asp
Forcing GarbageCollection
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconforcingcollection.asp
Why I need to call WaitForPendingFinalizers?
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemGCClassWaitForPendingFinalizersTopic.asp
Suppressing the Finalize method is explained here
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemGCClassSuppressFinalizeTopic.asp
Jessica explains all this in one of her articles:
http://www.martnet.com/~jfosler/articles/UsingDispose.htm
[Via Subhag Oak]