how does MemoryProfiler accomplish it?

Memory profiling for .NET developers

how does MemoryProfiler accomplish it?

Postby Christian » Fri Dec 13, 2013 11:19 am


our application is allocating objects which are stored in strong and weak references. we need to so some cleanup when objects are destroyed. after all strong references are released, objects still stays in memory (-> bad).
calling GC.Collect() does not help
when I use MemoryProfiler and press 'Take memory snapshot' the objects are destroyed immediately

we don't want to make these objects disposable

Is there something special what MemoryProfiler does to accomplish objects are destroyed (what we are not able to)?

Posts: 2
Joined: Fri Dec 13, 2013 11:08 am

Postby Chris.Allen » Mon Dec 16, 2013 1:44 pm

I have it on extremely good authority that the snapshot does:


and then gathers all the data.

I cannot account for why this doesn't have the same effect with your code. If we ( can get hold of the same code, we will be able to comment further.
Posts: 579
Joined: Thu Mar 12, 2009 3:17 pm

Postby Christian » Tue Dec 17, 2013 9:13 am


thanks for your feedback and the insight. this is something we tried already, but didn't work.

providing you with the code or a code sample is unfortunately not possible.
Posts: 2
Joined: Fri Dec 13, 2013 11:08 am

Return to ANTS Memory Profiler 8

Who is online

Users browsing this forum: No registered users and 0 guests