Skip Headers
Previous
Previous
 
Next
Next

Studying Type References

Studying type references helps you get closer to the leaking object.


Note:

This procedure assumes you have selected the type from the Trend table and are viewing it on the Type Graph, as described in "Trend Analysis Procedures".

  1. Locate the reference where you suspect the link is occurring by using one of the techniques described in Table: Locating a Suspected Reference:

    Locating a Suspected Reference

    To... Do this...

    Display referring nodes a few at time (recommended)

    1. Locate the darkest-colored node.

    2. Click the plus sign at the left end of that node.

      A few nodes referring to that one will appear. The number of nodes that appear is configurable from the Preferences dialog box.

    3. Continue clicking the plus signs in the darkest colored nodes as they appear.

    Display all referring nodes at once

    1. Right-click the darkest-colored node.

      A context menu appears.

    2. Select Expand All Nodes.

      The node expands to show all referring nodes.


  2. Right-click a node in which you suspect the leak is occurring (usually the one with the most data kept alive).

  3. Right-click the arrow between the two types where you suspect a leak.

    The arrow and the number under it are highlighted and a context menu appears.

  4. Select List referring instances.

    The Instance List appears to the left of the Type Graph and shows the instances of the selected type. The instances shown will only be those that have references to the type indicated by the arrow from the selected type in the Type Graph. If the list is too large, the Memory Leak Detector might time out when trying to display the list. You can change the time out setting under Window then Preferences.

    The column Data kept alive (bytes) shows how much data each instance keeps alive. This data currently cannot be garbage collected.

To investigate an instance of a type

  1. Select List All Instances.

    The Instances List appears. See "Investigating an Instance" to continue the memory leak detection process.