Explain the concept of Garbage Collection.
Explain the concept of Garbage Collection.
Approach: Describe automatic reclamation of memory.
Automatic memory management process that identifies and reclaims memory occupied by objects that are no longer reachable or used by the program.
Follow-up: What is a mark-and-sweep algorithm?
Key concepts: reachability, heap, stop-the-world.