Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
- Posts: 1
- Joined: Mon Feb 02, 2015 2:06 am
When I take a snap shot, does the memory profiler do a garbage collection?
- Posts: 1029
- Joined: Wed Mar 02, 2005 7:53 pm
Yes, when you collect a heap snapshot the profiler performs several full garbage collections, and waits for finalizers, in order to allow the .NET runtime to clean up as much memory as possible.If you don't want to clean-up the memory before the snapshot, you can use the command "Profiler->Collect gen #0 snapshot". This command causes a single generation #0 GC to be performed while collecting the snapshot. The snapshot will then usually contain unreachable instances and instances that are waiting for finalization.
SciTech Software AB
Users browsing this forum: Bing [Bot] and 30 guests