Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Memory Leak on Andriod - GDG LA July 2016
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Aaron He
July 28, 2016
Technology
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Memory Leak on Andriod - GDG LA July 2016
Aaron He
July 28, 2016
More Decks by Aaron He
See All by Aaron He
Road to Modularization(DroidCon NYC 2019)
aaronhe
1
220
There's No Magic - How Kotlin can be your best friends @DevFest LA 2017
aaronhe
0
45
Google I/O '17 recap - GDG LA May 2017 Android@Tinder
aaronhe
0
100
RxJava for Android - GDG DevFest LA 2016
aaronhe
0
91
Auto Value and Its Extension GDG LA April
aaronhe
0
64
OkMVP
aaronhe
0
76
Other Decks in Technology
See All in Technology
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
170
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
1
450
家のリアーキテクト・リファクタリング
suguruooki
0
140
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
350
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
780
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
380
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
240
あるけみー式LTスライド作成術
alchemy1115
1
210
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
270
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
370
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.8k
AIで仕事のやり方を変える
matsu7874
3
1.1k
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Paper Plane
katiecoart
PRO
3
53k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Site-Speed That Sticks
csswizardry
13
1.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Navigating Weather and Climate Data
rabernat
0
520
First, design no harm
axbom
PRO
2
1.3k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Transcript
Memory Leak on Android Aaron He
Out of memory error Fatal Exception: java.lang.OutOfMemoryError Fail to allocate
a x byte allocation with y free bytes until OOM
Heap
Causes of OOM • View pager inception • Bitmaps •
Library designed for Java not Android • Or…
Memory leak
Wait a sec…
Not if you are like this cat
How memory leaks • The reference to the root outlives
the root’s lifecycle. Activity/Context leak Listeners Be aware of anonymous class Android framework
Tools to help • Eclipse Memory Analyzer • LeakCanary •
Android Studio Memory Monitor
Eclipse Memory Analyzer • Dump HPROF in DDMS • Convert
it to J2SE format • Start analyzing! OQL
LeakCanary • HAHA(Headless Android Heap Analyzer): https:// github.com/square/haha • LeakCanary:
https://github.com/square/leakcanary • Customization
Demo!
Memory Monitor in AS Initiate GC Dump Heap Allocation tracker
Memory usage
Demo!
References • Managing Your App’s Memory: https://developer.android.com/training/ articles/memory.html • Managing
Bitmap Memory: https://developer.android.com/training/ displaying-bitmaps/manage-memory.html • Joda Time’s Memory Issue in Android: http://blog.danlew.net/2013/08/20/ joda_time_s_memory_issue_in_android/ • Eclipse Memory Analyzer: http://www.eclipse.org/mat/ • Detect all memory leaks with LeakCanary: https://youtu.be/mU1VcKx8Wzw • Android Studio Memory Monitor: https://developer.android.com/studio/ profile/am-memory.html
Thank you!
[email protected]
@aaronhe42