Explore Library
Flashcard

Closures and Retained Memory in Long-Lived Apps

How closures keep variables alive and cause subtle leaks in long-running JavaScript applications.

Question

Why can closures cause memory leaks in long-lived apps, and how does GC decide what to retain?

Click to reveal answer