Slide 23
Slide 23 text
Mark and Sweep
➔ Step 1: Starting from known live objects,
recursively traverse objects, marking them as
reachable.
➔ Step 2: Walk all allocated objects, deleting that
ones that aren’t marked as alive.
➔ No need to worry about reference cycles.