Path to GC Roots

Find out who is keeping alive a single object.

Motivation

Having found an expensive object it is then important to find all the reasons it is kept alive.

Arguments

Argument Description
object One object for which the paths to GC roots should be found.
-excludes Fields of certain classes which should be ignored when finding paths. For example this allows paths through Weak or Soft Reference referents to be ignored. This is of the format class name pattern[:field name[,field name]*]. Subclasses of the class are also included. If no field names are specified for the class then all fields are excluded.
-numberofpaths The number of different paths to be displayed.

Result

A tree view showing paths to a field object.
Note: With the arrows in each Icon of a piece of paper with an arrow at the top left pointing up and to the left. icon points up and to the left, showing that the field in bold of the object of a line actually refers to the preceding object in the tree view which is up and to the left.