## Heap walker view section |
| up | next

| With the heap walker, you can find memory leaks, look at single instances and flexibly select and analyze objects in several steps. Important notions are the current snapshot The heap walker operates on a static snapshot of the heap which is taken by choosing Edit->Take heap snapshot from JProfiler's main menu clicking on the corresponding toolbar button using the "Take heap snapshot for selection" action in the dynamic memory views. If a snapshot has already been taken, it will be discarded after confirmation. If the current session is detached, it is not possible to take a new snapshot, Taking a snapshot may take a few seconds depending on the size of the profiled application. the initial object set After a snapshot has been fully prepared, you are taken to the the classes view and all objects in the snapshot are displayed. You can return to this view at any later point by choosing Edit->Heap walker start view from JProfiler's main menu clicking on the the corresponding toolbar button the current object set After each selection step a new object set is created which then becomes the current object set. Starting with the initial object set, you add selection steps and change the current object set to drill down toward your objective. The contents of the current object set (any number of instances of classes and arrays) are described in the title area of the heap walker. You can calculate the deep size of the entire object set by clicking on the "Calculate deep size" hyperlink in the title area. Once the deep size has been calculated, the hyperlink is replaced with the result. The history of your selection steps can be shown at the bottom by choosing Edit->Show selection steps from JProfiler's main menu clicking on the the corresponding toolbar button the view on the current object set All views share the same basic layout. There are 4 views, all show the current object set: the classes view the allocation view the reference view the data view The view is chosen either using the view selector at the bottom of the heap walker. or from the view helper dialog that is displayed each time a new object set is created. You can suppress this dialog in the heap walker view settings.

| The history controls of the heap walker in JProfiler's toolbar allow you to go backward and forward in the history of your view changes. View changes where selection steps were performed, as well as those performed through the view selector are recorded in the history.

| Changing the current object set is done by clicking on the [Use selected] button in the heap walker views. You first select objects of interest and then use this button to create a new object set that contains only these objects. In many cases you can double click on an item to create a new object set with it.

| The heap walker will be able to display allocation information only for recorded objects. See the memory section overview for further details.