Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
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
45
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
200
There's No Magic - How Kotlin can be your best friends @DevFest LA 2017
aaronhe
0
34
Google I/O '17 recap - GDG LA May 2017 Android@Tinder
aaronhe
0
98
RxJava for Android - GDG DevFest LA 2016
aaronhe
0
85
Auto Value and Its Extension GDG LA April
aaronhe
0
57
OkMVP
aaronhe
0
72
Other Decks in Technology
See All in Technology
組織における AI-DLC 実践
askul
0
270
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
270
知見・人・API・DB・予算 ─ ナイナイ尽くしだった人事データ整備 with dbt、5年間の学び
ken6377
1
120
LiDAR SLAMの実装とセンサ融合 ~Lie群からContinuous-Time LIOまで~
naokiakai
1
790
認証認可だけじゃない! ID管理の構成要素と ライフサイクルを意識しよう
ritou
1
430
Tech-Verse 2026_Keynote
lycorptech_jp
PRO
0
110
グローバルチームと挑むプロダクト開発
sansantech
PRO
1
130
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
320
なぜ人は自分のプロジェクトを 「なんちゃってアジャイル」と 自嘲するのか
kozotaira
0
230
AIエージェントとPhysical AIが拓く製造業の変革(ハノーバーメッセリキャップ)
iotcomjpadmin
0
200
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
320
SRE歴2ヶ月でも開発6年の知見を活かして、チームで止まっていた環境改善を前に進めた話
a_ono
0
170
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
880
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Into the Great Unknown - MozCon
thekraken
41
2.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
400
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Odyssey Design
rkendrick25
PRO
2
710
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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