Search code examples
javajvisualvm

What is the difference between live objects and allocated objects in VisualVM?


As seen in the screenshot here, 0 live objects, 9 allocated objects.

What's the difference between a live and an allocated object?

jvisualvm screenshot


Solution

    • Allocated objects are all objects that have been created since application start (or reset)
    • Live objects are reachable objects that are being actively used by your program (likely still in the Young Generation)