The Group by Similar Retention view groups objects by similarity of their retention paths. For each object set, the view shows two shortest paths to roots. Note that from the whole variety of shortest paths, dotMemory selects only two paths that are most different from each other.
The Group by Similar Retention view allows you to distinguish where the objects of the same type logically belong to. For example, it's obvious that a number of int variables in an array will have the same retention path which is different to variables of any other int array.
You can also use Group by Similar Retention to identify why an object is still in memory. For example, it may be useful when investigating potential memory leaks caused by objects retained on more than one path (Not exclusively retained objects. See Group by Dominators for details).
Only two shortest retention paths are shown. Typically, it is enough to understand why an object survives the garbage collection.
The list of objects for which graph is built consists of the following columns:
|Objects count||The number of objects with the same retention path.|
|Bytes||The overall size of objects in bytes.|
What Can I Analyze Next?
In the Group by Similar Retention view, you can select the following subjects for further analysis:
Similarly retained objects
To select objects of a certain type that are retained in the same way (have the same paths to roots), double click on the corresponding type in the list. After this, the [Type_name] with same retention paths subject will be added to the Analysis Path and objects will be displayed in the Type List view.