DEV Community

Discussion on: Garbage Collector: The Desirable Aspect of Java

Collapse
 
haytamkh7 profile image
haytam_7 • Edited

The garbage collection reclaims the used resources that are no longer in use. It's like saying "When there are no references to an object, the object then is ready to be collected".
Memory that is not automatically reclaimed usually leads to a memory leaks, a situation that is less likely to happen in Java.