Garbage Collection Algorithms and Reference Counting in QuickJS
QuickJS manages memory using reference counting for each object combined with a cycle‑collector that periodically scans roots, decrements child references, and frees objects whose counts drop to zero, while also supporting traditional reachability‑based garbage‑collection techniques such as mark‑sweep, copying, and generational collection.