jargon

Comparison

Detached DOM nodevsGarbage collection

Detached DOM node

you removed the element from the page but a variable still points at it, so it never gets collected.

A node removed from the document that JavaScript still references, keeping it and its entire subtree in memory. It is the most common leak shape in a single-page application, produced by caching elements, by listeners on `window` that close over them, and by components that unmount without cleaning up. The memory profiler reports these directly, which makes it the fastest leak to confirm once you suspect it.

Full entry →

Garbage collection

memory in the tab keeps climbing across navigations and never comes back down.

The engine reclaiming objects that are no longer reachable from any root. Because reachability is the only criterion, a leak in JavaScript is always something still holding a reference: a listener never removed, a timer never cleared, a closure in a module-level cache. Collection pauses are usually invisible, but a large heap makes them longer and turns them into dropped frames.

Full entry →

Related comparisons