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

  • Thread starter Thread starter DR
  • Start date Start date
D

DR

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() ?
 
If you are using CF 2 like I do, you can retarget your application to
run on the full framework and then use the Profiler for the full
framework.

Besides, I think that setting all the references to null is not
enough... you should call Dispose() where it is requiered (i.e.
Bitmaps).
 
Back
Top