Plugging Memory Leaks With The Chrome Dev Tools
summary
Chrome DevTools heap snapshots plus allocation timeline and allocation profiles locate retained objects, where event listeners left on the window and unremoved game bullets keep four game instances alive. An asteroids demo intentionally inflates objects with 100k integers to show the trace, and a real Lucidchart case shows temporary allocations of up to 3.5 GB during load (final heap a few hundred MB) that cause GC thrashing. Production telemetry across ~500k sessions shows ~1 MB per minute average heap growth before fixes.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 2:20Garbage Collection Review
- 3:43Memory Leaks Explained
- 7:52Example Application
- 9:26Performance Tab
- 10:43Heap Snapshot
- 17:32Snapshot Comparison
- 18:54Allocation Timeline
- 19:52Whats Left
- 21:16The Healthy Pattern
- 25:58The Healthy Memory Graph
- 27:13Memory Allocation
- 35:31JS Profiler
- 38:41Performance Data
- 45:01Event Handlers
- 47:01Memory Management
- 49:16Anonymous Functions
- 50:41Source Maps
related talks
20mMemory Leaks and the Havoc They Wreak
05mIn hope for better memory tools
35mAnalyze the JS Heap and detect Memory Leaks
31mMemory Leaks in JavaScript
35mMemory Chronicles: Manage, Trace and Fix Memory Leaks
19mUnderstand, find, prevent and fix memory leaks in JavaScript
29mEffectively Managing Memory At Gmail Scale
24mDemystifying Memory Leaks in JavaScript
