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!
Should see DependencyProperty refs not EffectiveValueEntry[]
-
- Posts: 1
- Joined: Tue Nov 24, 2009 2:24 am
-
- Posts: 1030
- Joined: Wed Mar 02, 2005 7:53 pm
Who is online
Users browsing this forum: No registered users and 4 guests