Root Live (young gen) Live (old gen) Marked this scan Garbage (unreachable)
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Mark-and-Sweep Garbage Collector

Every managed-memory language — Java, JavaScript, Python, Go — reclaims memory automatically by treating the heap as a directed reference graph and asking one question: can this object still be reached from a root? This simulator renders that heap as a live 3D graph. Allocate objects, wire and drop references between them, and watch a real breadth-first mark phase spread outward from the gold root nodes, followed by a sweep phase that ejects every node the wavefront never touched — the exact two-phase algorithm (and its generational young/old refinement) that runs, invisibly, under almost every program you use.