Should see DependencyProperty refs not EffectiveValueEntry[]

Use this forum to discuss and/or suggest future improvements of .NET Memory Profiler and to report bugs.
Post Reply
Posts: 1
Joined: Tue Nov 24, 2009 2:24 am

Should see DependencyProperty refs not EffectiveValueEntry[]

Post by GordPollock » Tue Nov 24, 2009 2:50 am

When a WPF DependencyObject holds references via DependencyProperty's, the references are stored internally in EffectiveValueEntry arrays. These are hard to work with in the memory profiler.

For example: Right now I'm looking at an object referenced by a dependency property on a MenuItem; in the "Referenced by" column I see "EffectiveValueEntry[] #182,246[16]._value" instead of "MenuItem #182,241". MenuItem shows up near the top of the root path, so figuring out which object holds the reference is not difficult. But I don't have a fast way of telling which dependency property on MenuItem is referencing this object. I can look at the EffectiveValueEntry array, look at the entry, find the _propertyIndex, then look through the list of DependencyProperty's to find one with a property index that matches, but this is tedious.

Perhaps I should post my list of instructions for debugging dependency properties; it's not obvious that it's possible at all.

This process would be much easier if a new feature was added to support this.

BTW, I find your tool extremely useful. Thanks!

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

Post by Andreas Suurkuusk » Tue Nov 24, 2009 4:39 pm

Thanks for the suggestion. It's a great idea, and it something that we will try to implement in a future version. It might be implemented as "pseudo-properties" for certain common types (we cannot run the actual property getter).
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests