When and How is an object considered as Garbage by a GC?

Q

When and How is an object considered as Garbage by a GC?

✍: Guest

A

An object is considered garbage when it can no longer be reached from any pointer in the running program. The most straightforward garbage collection algorithms simply iterate over every reachable object. Any objects left over are then considered garbage.

2013-03-21, 1894👍, 0💬