Referenced by
The Referenced by panel is only available for managed type instances and shows a tree containing all the instances, static fields, and other roots that references the selected instance, also called referrers in this manual. The details of an instance referencing the selected instance can be viewed by double-clicking the corresponding entry in this list or by selecting Show Instance Details from the menu. The items can be sorted by clicking on the column headers. The following information is presented for each entry in this list:
Type
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 contain the text: “<root>.”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.
It is possible to expand each instance in the Referenced by tree, to get information about the next level of referrers.
Note
If a WeakReference (or a weak <GCHandle>
) instance is referencing the selected instance, it will be included in the Referenced by list, but it will not be part of any root path, since a weak reference never prevents an instance from being garbage collected.
Only show instances included in root paths
If the Only show instances included in root paths checkbox is checked, only instances that are part of one of the root paths presented for the selected instance are presented in the Referenced by tree. Instances that only have root paths that include the selected instance are not included in any root path and are usually of no interest when analyzing causes of a memory leak.
Using this option provides a way of analysing the root paths by expanding instance items in the tree. If all instances are included in the Referenced by tree, there is a risk that cycles are included in the tree (e.g. m_child→m_parent→m_child,...), making it harder to find the actual root paths. Enabling this option will prevent all cycles (a root path from an instance cannot contain the instance itself) and present the shortest path to each root.