Show Table of Contents
9.2.14. About Garbage Collection
Garbage collection is a form of automatic memory management provided by the Java Virtual Machine (JVM). Periodically, the garbage collector runs, and reclaims memory which was claimed by objects which are no longer in use by applications.
An object becomes eligible for garbage collection when there are no more references to it. In effect, this means that no threads refer to it anymore.
Garbage collection happens outside of user control. The JVM decides to run garbage collection based on the amount of available heap size. The heap size is tunable for performance. Refer to the documentation of your JVM for more information.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.