Filter based on Finalizer Pending?

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Filter based on Finalizer Pending?

Postby PatrickCBrown » Tue Jun 07, 2011 5:19 pm

Hi

Is there a way in Memory Profiler 7 that I can filter only objects waiting for their Finalizer to be called?

Thank you,
Patrick
PatrickCBrown
 
Posts: 1
Joined: Tue Jun 07, 2011 5:17 pm

Postby Brian Donahue » Thu Jun 09, 2011 12:52 pm

The only filters related to finalizers are the "objects that are disposable" and "objects that are/are not disposed", and "zombie objects" filters. I think you would be most interested in zombies because it includes objects on the finalizer queue which, for some reason, could not be collected.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby AndrewH » Fri Jun 10, 2011 11:47 am

There are actually several filters relating to this.

Most directly, you probably want the 'Kept in memory exclusively by GC root of type finalizer queue' filter, which will give all of the objects that are only in memory because an object hasn't been finalized.

You can limit this only to the objects that are actually on the finalizer queue by turning on the 'Objects that are GC roots' filter.
Andrew Hunter
Software Developer
Red Gate Software Ltd.
AndrewH
 
Posts: 134
Joined: Thu Aug 17, 2006 3:44 pm


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests

cron