Section 8.10 Garbage Collection

• The Java Virtual Machine (JVM) performs automatic garbage collection (p. 338) to reclaim the memory occupied by objects that are no longer in use. When there are no more references to an object, the object is eligible for garbage collection. The memory for such an object can be re-claimed when the JVM executes its garbage collector.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.