20 Garbage Collection
After reading lesson 20, you will be able to:
- Understand how Java allocates memory for objects using the Heap
- Understand how Garbage Collection (GC) works in Java
Even though memory has become less expensive and more compact, there are still physical limits to how much memory an application is allocated during runtime. Early versions of Java required the programmer to manually search for unused objects and remove them to recapture this space. In this lesson, I will explain how this process is now automated and why it is important.