Attaching to a process

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 5
Joined: Wed Apr 30, 2008 8:09 pm

Attaching to a process

Post by mikej » Tue Jun 02, 2009 7:29 pm

When I attach to my application running, perform some tasks, then perform a Collect Heap Snapshot, I see some things that have references that I do not expect to have references.

When I drill down on these objects, and view the Referenced By list I see several objects with the yellow warning symbol next them warning me about delegate references or something like that

I check the check box "Only show instances included in root paths". When I check the check box the list in the Referenced By goes blank.

Do I or don't I have a memory leak?

I am guessing because I attached to the process a GC is not performed before the snap shot is taken, thus I will see some things differently than if I started the application using the profiler.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Wed Jun 03, 2009 3:58 pm

When you collect a snapshot on an attached process, there's always a risk that there are lingering instances presented by the profiler (e.g. instances waiting for finalization). In order to see all root paths for an instance, you might need to deselect "Only include identified roots". After you have done that, you should be able to see why the instance has not been GCed. If you need help investigating this, please provide some more information about the instances that are left on the heap, includuding one or more root paths.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests