Semicolony ELI5 · comic

Garbage collection.

A tidy-up crew that clears away any object nobody is pointing at anymore, so you don’t free memory by hand.

  1. root
    1

    A program makes lots of objects. Some are still in use; some you’ve quietly stopped needing.

  2. Anything loose?
    2

    A collector comes by — not to read your objects, just to ask “is anyone still holding this?”

  3. root
    3

    It starts from the roots and follows every reference, marking all it can reach.

  4. Nobody’s holding these.
    4

    Whatever no live reference points to is unreachable — and gets swept away.

  5. root free
    5

    That memory goes back on the free pile, ready to be used again.

  6. Hold still a sec…
    stop the world
    6

    The catch: it runs on its own schedule, and may briefly pause everything to clean up.

Keep whatever is still reachable; sweep away whatever nothing points to.
Semicolony semicolony.dev/eli5/garbage-collection/comic
← All ELI5 explainers