Use the instance categorizer to investigate the paths that are holding classes in memory.

The instance categorizer shows reference relationships between classes, which can help identify instances that are unexpectedly kept in memory. This can be particularly useful if your snapshot analysis identifies a class you do not recognize: Use the explorer to follow chains of references to the class, until you reach a class you recognize which may be responsible for the memory usage.

When you apply filters, the instance categorizer only includes the filtered objects.

The instance categorizer has two different views:

Categorized references view

This is the default view. In this view, instances of the selected object are categorized by the shortest path to a GC Root. The path responsible for holding most instances of the selected class is shown at the top.

To see the instances that each category contains, click your selected class (in black, on the right), and then click Show instance list.

All references view

In the all references view, your selected class is shown at the center of the graph (in black). Classes to the left have instances that reference any instance of the selected class; classes to the right have instances which are referenced by at least one instance of the selected class.

Tips