Concept
Mark-and-Sweep Algorithm 0
The Mark-and-Sweep algorithm is a garbage collection technique used in memory management to automatically reclaim memory by identifying and freeing objects that are no longer reachable from the root set. It operates in two phases: marking reachable objects and sweeping unmarked objects, thus preventing memory leaks and optimizing resource usage.
Relevant Degrees