The Heap window displays information about the heap in the program you are debugging and helps you to detect memory leaks in your program. You can view all instances of a class as well as why an object has not been garbage collected.
Note: Only the Oracle Java Virtual Machine (OJVM) provides heap information. Heap information is not provided by Sun Microsystem's Java Platform Debugger Architecture (JPDA), the debugging protocol used with the Classic and HotSpot Java Virtual Machines. If you are using either the Classic or the HotSpot virtual machine (the VM is specified in the Run/Debug page of the Project Properties dialog), the Heap window will not be able to provide any information about the heap in the program you are debugging.
There are two types of folders displayed in the Heap window:
For more information about this window including its context menu options, press F1 or click Help in the Heap window.
To open and use the Heap window:
Open source files in the Source Editor and set breakpoints.
In the toolbar, click Debug.
When the debugger hits the breakpoint, select
View
Debug Windows
Heap from the main menu.
The Heap window appears.
Right-click in the Heap window and choose Add
Class Folder from the context menu. Alternatively, drag a
class node from the Classes window into the Heap window. Or, right
click on a class node in the Classes window and choose
Show In Heap from the context menu.
Information about the classes
appears in the Heap window.
About Debugger Windows
Setting Preferences for the Debugger Windows
Running Java Programs
Configuring Your Project for Running
Configuring Your Project for Debugging
Copyright © 1997, 2004, Oracle. All rights reserved.