JavaScript·Intermediate·Conceptual·1 min read
What is a memory leak in garbage-collected JavaScript?
Short interview answer
It is memory that remains reachable even though the application no longer needs it. Common causes include unbounded caches, forgotten listeners or timers, retained detached DOM nodes, observers, and closures captured by long-lived owners.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.