Q. What is the purpose of garbage collection?
β
Correct Answer: (D)
Removes object with no reference
Explanation: When the interpreter sees an object in the heap with no object references, it removes that object from the heap. This is called garbage collection.