Finding a memory leak in a transaction-oriented operation

This procedure may help identify a phase in your program that creates new objects but does not release them, thus preventing their removal through garbage collection. For example, your program creates a dialog window but objects related to the dialog continue to be held after the window has been closed.  The general procedures consists of the following:

  1. Profile your application.  Collect object references before the operation in question and view the Object References table.  Use the procedure described in Identifying Memory Leaks.
  2. Run the operation, collect object references again, and view the table to see the objects references that were created. 
  3. Terminate the operation, collect object references, and view the table to see whether any references remain to the created objects.

Collecting object references before and after the operation

  1. To create a dump of the object references, use the Collect Object References button  a button with stylized icon. The objects that existed just prior to the dump are the old objects
  2. Then, create a dump of the objects and references just after the operation is finished. The objects that were created and could not be collected in the interval between the two dumps of the references will be labeled as new objects in the Object References table.

Viewing the profiling data in the Object References table

  1. Open the Profiling Monitor view.
  2. Select the agent.
  3. Right click, then select Open With > Object References. The Object References table opens.

Identifying an object's references

To identify an object's references:

  1. Open the Object References table.
  2. Ensure that Show Reference By has been selected.
  3. Select your object class, then expand the item.
  4. Identify the references that prevent the new objects from being reclaimed.
 

Related concepts
Overview of the Profiling Tool
Profiling resources
Object References table

Related tasks
Identifying memory leaks 
Profiling an application
Launching or attaching a Java process
Analyzing performance and memory usage - overview


 
 

>