An essay to explain some of the main ideas regarding the garbage collector on the JVM
This document aims to give insights about the garbage collection process on Java Virtual Machines. This process, which helps programmers to forget about allocating and freeing memory, is often misunderstood, which leads to problems such as running out of memory, spending too much time on processes such as freeing or allocating memory, and generating too long pauses (stop-the-world events, which are explained below) during its execution. Following, general concepts about the automatic management of memory are explained, and then the main ways to perform garbage collection in Java are explained. This document does not deal with flags needed to tune the garbage collector since these will be analyzed in future publications.
You can download the whole document using the following link.
Another tip: The number of Java garbage collector memes flowing on the internet is endless. We strongly advise that you read some; until then, enjoy these randomly found on Google Images: