Graph Presentation
The instance graph is presented as a directed graph, where each instance and root is represented as a node, and the references between the instances are represented by directed edges. The table below presents the symbols that are used to present different types of instances and roots.
![]() |
Selected instance |
![]() |
Shortest root-path instance An instance that is part of a shortest root-path. |
![]() |
Reachable shortest root-path instance An instance that is part of a shortest root-path and it is reachable from the selected instance. |
![]() |
Non-shortest root-path instance An instance that is part of a non-shortest root-path. |
![]() |
Reachable non-shortest root-path instance An instance that is part of a non-shortest root-path and it is reachable from the selected instance. |
![]() |
Held instance An instance that is held by the selected instance. |
![]() |
Reachable instance An instance that is reachable from the selected instance, but it is not held. |
![]() |
Referrer instance An instance that has a path of references to the selected instance, but it has not been identified as a root-path instance. |
![]() |
Held referrer instance An instance that is held by the selected instances and it has a path of references back to the selected instance. |
![]() |
Reachable referrer instance An instance that is reachable from the selected instance and it has a path of references back to the selected instance, but it is not held. |
![]() |
Root A root that is preventing the selected instance from being garbage collected. |
The symbols can also be emphasized by adding an outline to the graph elements.
![]() |
Primary item This outline indicates a primary or target element of an operation. For instance, instances that have been extracted from a combined node will be marked as primary instances. |
![]() |
Secondary item This outline indicates a secondary element of an operation. For instance, instances that contain left-over instances from an expand operation will be marked as secondary instances. |
![]() |
Highlighted path Root paths can be highlighted using the center or highlight root path command, or by the graph synchronization. |
Large Instance Graph Reduction
An instance graph can easily become much larger than can be conveniently presented visually. To avoid presenting too large graphs, .NET Memory Profiler will reduce the graph by combining groups of instances and roots into single graph nodes. The profiler tries to select groups so that the overall structure of the graph is affected as little as possible. The example below shows how instances are combined in a graph that contains a long linked list:
Original instance graph
Instance graph with combined instances
Combined instances in the graph are indicated by using the following three symbols:
![]() |
Indicates that instances have been combined horizontally. All instances have the same shortest-path distance to the selected instance. |
![]() |
Indicates that instances have been combined vertically. All instances have different shortest-path distance to the selected instance. |
![]() |
Indicates that instances have been combined horizontally and vertically. |
Combined instances can be expanded by using the Expand command that is available in the popup window and right-click menu of the combined instances and combined references. The expand options depend on how the instances and references have been combined. Typically they include options for expanding a specific type, a field, or just a number of instances.