Garbage Collection
In Java systems, the developer does not need to explicitly configure memory allocation and deallocation. Instead the system will automatically allocate the memory for the Java objects, and whenever the objects are terminated, the background process called the garbage collector (GC) will remove or destroy the memory area so that space is freed up for allocation to a new Java object. This way, the programmer does not have to worry about memory allocation and Java programming is more efficient and easy to use. Since GC is an automated process, the number of memory leaks caused by developer errors is also minimized. The following section will cover details of the GC process, types, and its effects on system performance. In order ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access