Reputation: 407
Is there any way to walk the heap from a .NET application? I have a Silverlight application and want to be able to examine the heap for memory leaks. I thought it would be nice to implement a debugging popup window that would display the contents of the heap. I have looked through the .NET API namespaces and can't find anything relevant.
Upvotes: 3
Views: 437
Reputation: 1996
You can also try the SysInternals's tool ProcessExplorer. It have a tab named .NET where you can find a lot of specific data about .NET applications (memory, garbage collector activity, etc). Every time I suspect that my code is leaking memory I use this tool to check and understand what is happening.
Upvotes: 0
Reputation: 564441
You can use the SOS Debugging Extension to examine the managed memory allocations in your program.
Here is a blog post walking through how to do this with Silverlight.
Upvotes: 1