How to find objects awaiting finalization in a Java heap dump
Environment
- Java
Issue
Is it possible to tell what objects are awaiting finalization in a Java heap dump?
Resolution
In Content from eclipse.org is not included.Eclipse MAT, you can view Java Basics -> Finalization Overview to see information about finalization. If that does not show any objects or you need more information, you can see all objects awaiting finalization by running the OQL query:
SELECT OBJECTS f.referent from java.lang.ref.Finalizer f
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.