At the top right, the root paths of the instance are shown. A root path is the path of referrers from the selected instance to a root. A root can, for instance, be a static field, a local variable, or a method parameter. If a root cannot be identified, the roots are simply referred to as <root>. For an unmanaged resource instance, the wrapper instances are used as referrers to the instance. If no wrapper instances exist, no root paths will be presented.
The root path can be extremely useful for identifying memory leaks. When using the observer pattern or caching instances, it is very easy to forget to remove an observer or to let the cache grow too much. The root path shows why an instance has not been garbage collected.
The shortest path from the selected instance to each root is presented, and the shortest path is shown first. The navigator buttons above the root path can be used to select which root path to show.
The Only include identified roots checkbox can be used to show only root paths that end in an identified root.
At the top of the Root path table is the nearest referrer. The farther a referrer is from the selected instance, the farther that referrer is down the list. At the bottom of the list is the root referrer, which is either presented as the name of a static field, a method, or as <root>.
The following data is presented for each referrer:
Namespace
This column shows the namespace name of the instance
or type that references the selected instance. If the reference is an
unidentified root, this column will contain the text: <root>.
Name
This column shows the type name of the instance or type
that references the selected instance. If the reference is an unidentified root,
this column will be empty.
Instance/Field/Method
This column shows different information
depending on the type of the referrer:
If the referrer is an instance, this column shows the instance number of that instance, followed by the name of the field (or item in an array) containing the reference will be appended at the end (e.g., #89,123.m_referenceField or #12,890[5]).
If the referrer is a static field root, this column shows the name of the static field
If the referrer is a local variable or method argument root referrer, the name of the method is presented in this column.
If the referrer is a <GCHandle>, this column will present the instance number of the <GCHandle>, together with any additional GC handle information, such as Weak or Pinned.
NOTE! If all root paths are shown (i.e., Only include identified roots is cleared), then each static root will be presented twice. The Common Language Runtime implements static roots as System.Object arrays, and the memory profiler has no way of identifying this array as an array of static roots. Thus, this array will be presented alongside the static roots.
|
.NET Memory Profiler User Manual © Copyright 2002-2009. SciTech Software AB. For information about .NET Memory Profiler, see the product site at http://memprofiler.com .NET Memory Profiler is developed by SciTech Software AB
|