Path To GC Roots queries
The queries in the Path to GC Roots group show you which object is keeping a set of objects alive.
Description
Several queries are available in this group. By using these different queries, you can include all references in the report, or exclude specific references.
- The thread objects of the threads that are currently running.
- The objects that are currently on the call stack.
- The classes that were loaded by the system class loader.
The reports from these queries reverse the object reference chain back to the object that is keeping an object, or set of objects, alive. The path helps to explain why an object cannot be garbage collected, and can solve typical Java™ memory leak problems. In these cases, a leak exists because an object is still referenced, even though the program logic does not access the object anymore.
Result
A tree that shows the object that you specified, and the objects that it is keeping alive.
Initially, the GC root that is reached by the shortest path is selected.