Beginner Compilers & Programming Language Theory
Q29 / 100

What is garbage collection?

Correct! Well done.

Incorrect.

The correct answer is B) Automatic memory management reclaiming heap memory occupied by objects no longer reachable by the program

B

Correct Answer

Automatic memory management reclaiming heap memory occupied by objects no longer reachable by the program

Explanation

GC algorithms: reference counting (Python — cycles need cycle collector), mark-and-sweep (traverse from roots, free unreachable), copying (compact live objects), generational (most objects die young). Trade: simpler programming vs. GC pauses.

Progress
29/100