Collecting garbage with the new Java platform
Java came out of the gate with automatic garbage collection, making it a development platform of choice for many programmers. It was commonplace to want to avoid manual memory management in other programming languages. We have looked in-depth at the garbage collection system to include the various approaches, or algorithms, used by the JVM. Java 9 includes some relevant changes to the garbage collection system and was the focus of three Java Enhancement Program (JEP) issues. Those issues are listed here:
- Default garbage collection (JEP 248)
- Depreciated garbage collection combinations (JEP 214)
- Unified garbage collection logging (JEP 271)
We will review each one of these garbage collection concepts and their corresponding Java Enhancement Plan (JEP) issue in the following sections.
Default garbage collection
We previously detailed the following garbage collection approaches used by the JVM prior to Java 9. These are still plausible garbage collection...