
Written by Michał Piotrowski2025-03-20
Garbage collection theory – Mark&sweep
GC Theory Article
Reading Time: 10 minutesMark&sweep was already mentioned in the previous posts. It is a cornerstone of all the marking algorithms, and is used as a backup for cyclic data structures in the ref counting. The time has come then to take a deeper look at it. Basics of mark&sweep To remind us what we’re discussing here – mark&sweep