Mark and sweep is a garbage collection technique involving two phases.
Mark
The garbage collector traverses the object graph from the root to discover all objects that are reachable
Sweep
The garbage collector deallocates memory from objects that are not reachable.