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
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に奪われないし、たぶんその BIも要らない
hikaruri
0
320
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
事業課題から技術的負債に向き合う
sansantech
PRO
2
540
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
130
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
1.2k
range over func 2年間の軌跡 Issue #56413 はGoのエコシステムをどう変えたか
ryujicre8ive
0
130
2026/09/10 Spring Bootから Jakarta EE/MicroProfileへの移行
megascus
0
350
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
4
540
AI時代のAPI品質を支えるガードレール / API Guardrails for API quality in the AI era
yokawasa
1
240
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
260
20260912_スクラムにジェネラリストは必要か
ryugen04
0
390
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
180
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
870
Automating Front-end Workflow
addyosmani
1369
210k
Claude Code のすすめ
schroneko
67
230k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
450
Producing Creativity
orderedlist
PRO
348
41k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
For a Future-Friendly Web
brad_frost
183
10k
We Have a Design System, Now What?
morganepeng
55
8.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
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