Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?



DR wrote:

GC.Collect() not cleaning memory, how to find out what references to lots of
memory still exist?

When all my processign is done i set everything to null and then:
GC.Collect();
and then
GC.WaitForPendingFinalizers();
but it still shows that my process takes 400 MB of memory. Is there any easy
way to see what references that I forgot to set to null so that the memory
cleas up on GC.Collect() ?

BTW, WinDbg combined with SOS can find your roots too, for free. Rico
Mariani did an interesting presentation and some blog posts about it:

http://www.google.com/search?q=rico+mariani+windbg+sos+root

Here's one post:

http://blogs.msdn.com/ricom/archive/2004/12/10/279612.aspx


-- Barry

--
http://barrkel.blogspot.com/
.



Relevant Pages