garbage collection

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.

Moderator: SciTech Software

garbage collection

Postby mksup » Mon Feb 02, 2015 2:07 am

Hi,
When I take a snap shot, does the memory profiler do a garbage collection?
mksup
 
Posts: 1
Joined: Mon Feb 02, 2015 2:06 am

Re: garbage collection

Postby Andreas Suurkuusk » Mon Feb 02, 2015 11:30 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.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 960
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden


Return to Using .NET Memory Profiler

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.


SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081

cron