Identifying memory leaks

A memory leak is an error in a program's dynamic store allocation logic that causes it to fail to reclaim discarded memory. That is, objects that are no longer required are not reclaimed. Unexpectedly large numbers of such instances may suggest a memory leak. A memory leak, if severe, can lead to the collapse of your application due to its running out of memory.

Memory leaks are caused by objects that continue to hold references to other objects, thus preventing garbage collection from reclaiming the held objects.  The Object References table can be used to help identify such references.

Follow these steps:

  1. Select either the monitor or the agent in the Profiling Monitor view. 
  2. Run Collect Object References action on the active agent.
  3. Right click, then select Open With > Object Reference.  The Object References table opens.
  4. On the local menu  a button with triangle icon select Show Reference To.
  5. Examine the list of objects and the number of references to them.  Those that have references are a potential memory leak problem. 

 

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

Related tasks
Finding a memory leak in a transaction-oriented operation
Profiling an application
Launching or attaching a Java process
Analyzing performance and memory usage - overview