Root causing memory growth with LeakCanary 3
summary
Creates reproducible memory-growth detection for Android by running UI scenarios in a loop, taking repeated heap dumps and diffing them with LeakCanary 3 to find structures that steadily gain edges. Builds a heap-diff detector that runs up to 5 heap dumps, 10 repeats, compares reachable-object graphs instead of instance IDs, and flags growing nodes (example: a navLog list causing retained size to rise ~4 KB per iteration that eventually triggers OOM and jank).
AI-written summary · about
chapters (11)
- 0:00Memory growth analysis intro
- 1:03Memory growth vs leaks
- 6:27Detecting memory issues with navigation
- 11:26Why LeakCanary misses growth
- 14:14Heap dumps for object growth
- 18:09Graph traversal for GC simulation
- 28:48Object ID instability challenges
- 29:49Graph structure growth insights
- 31:54Heap diff for growing objects
- 34:44Interpreting LeakCanary heap diff
- 35:49Slack app case study
related talks
37mUniversal heap trimming with LeakCanary 3
31mA Small Leak Can Sink A Great Ship
47mLeakCanary, and Then? Unraveling Android Memory Leaks
35mA small leak can sink a great ship
24mUnveiling the Unseen Threat: Demystifying Memory Leaks in Android
37mLeakCanary, then what? Nuking Nasty Memory Leaks
42mSpeaking of Leaking
33mNuking Nasty Memory Leaks
