the.com/garbage collector
the janitor inside your program, quietly sweeping up memory you forgot you littered.
means an automatic system that finds and frees memory no longer being used by a program, so the programmer does not have to.
from coined in 1959 by john mccarthy while designing lisp, which needed a way to reclaim memory from discarded list structures without manual bookkeeping.
first appearedlisp, 1959, mccarthy's invention
mark and sweepoldest algorithm, still taught first
costcan pause your whole program mid-run
rust's betno gc at all, ownership rules instead
for instance
java hotspot gc — powers most enterprise servers, tunable with dozens of flags
go's concurrent gc — designed since 2009 to keep pause times under a millisecond
python's refcounting — frees objects the instant their reference count hits zero
v8 orinoco — chrome's engine, splits collection across threads since 2018