University of Washington • CSE583 • D. Notkin © 2000
27
Garbage collection
lSystem automatically reclaims memory for unused data structures
–Programmer needn’t worry about freeing unused memory
–Avoids freeing too early (dangling pointer bugs) and freeing too late (storage leak bugs)
–System can sometimes be more efficient than programming