References — Memory, Retention & Leaks
Specifications
- ECMAScript — WeakMap objects, WeakRef, FinalizationRegistry — note how little the spec guarantees about when anything is collected.
- WHATWG DOM —
AbortController/AbortSignalandaddEventListeneroptions — thesignaloption is the structural teardown primitive. - W3C —
measureUserAgentSpecificMemory()— the only in-page API spanning JS and DOM memory; requires cross-origin isolation.
Engine internals
- V8 blog — Trash talk: the Orinoco garbage collector — generational GC, scavenger vs mark-compact, why pause times behave as they do.
- V8 blog — Concurrent marking
- V8 — Memory analysis / heap snapshot format — node fields including
detachedness. - Chromium — Oilpan, Blink's GC — why DOM memory is not in the JS heap. Cross-track:
browser-framework-internals.md§8, §17.
Tooling
- Chrome DevTools — Memory panel reference — snapshot comparison, retainer paths, the three-snapshot technique.
- Chrome DevTools — Heap snapshot terminology — shallow vs retained size, dominators, distance.
- CDP — HeapProfiler domain —
collectGarbage,takeHeapSnapshot. memlab(Meta) — automated leak detection in CI; the closest production-grade version of experiment 5.
Analysis and practice
- web.dev — Fix memory problems
- Addy Osmani, JavaScript memory leaks and how to avoid them
- Nolan Lawson — Fixing memory leaks in web applications — unusually good on method rather than symptom lists, and on why the DevTools workflow is ordered the way it is.
Deliberately excluded
Listicles of "10 causes of memory leaks". They enumerate symptoms without the reachability model, which leaves you pattern-matching instead of reading a retainer path — and the retainer path is the only thing that generalises to a leak nobody has blogged about.