SlideShare a Scribd company logo
Memory Leak
Android
● What is memory leak?
● Tools : MAT(Eclipse Memory Analyzer)
● How to detect Memory leak in Android
“App expands to fill the memory available”
- From Dinesh Prajapati
What is Memory Leak?
loss of available memory when a program fails to return memory that it has obtained for
temporary use
A constantly increasing memory usage is not necessarily evidence of a memory leak
Garbage Collection
Stack vs Heap Memory
Visual
Reference objects but not exactly used
Not considered as Unreferenced objects
GC can not happen
Stays in memory for longer
MAT
The Eclipse Memory Analyser Tooling
(MAT) is a set of plug-ins for the
Eclipse IDE which provides tools to
analyze heap dumps from Java
application and to identify memory
problems in the application. This helps
the developer to find memory leaks
and high memory consumption issues.
It visualizes the references to objects
based on Java heap dumps and
provides tools to identify potential
memory leaks.
http://eclipse.org/mat
Shallow Heap and Retained Heap
Dominator tree
Histogram
Memory Leaks
● Reference to activity,Context,View,Drawable,...
● Non-static inner class
● Caches
12,256
No of questions on stackoverflow.com for memory leaks
Practical
Let’s Explore MAT
Thanks!
Dinesh Prajapati
TL, EMS, ICPL
Ad

Recommended

Memory leak
Memory leak
Anandraj Kulkarni
 
Memory Leak In java
Memory Leak In java
Mindfire Solutions
 
Memory Leaks in Android Applications
Memory Leaks in Android Applications
Lokesh Ponnada
 
Identifying memory leaks in Android applications
Identifying memory leaks in Android applications
Zachary Blair
 
Android Performance Best Practices
Android Performance Best Practices
Amgad Muhammad
 
10 ways to improve your Android app performance
10 ways to improve your Android app performance
Boris Farber
 
WPSDK 7.1.1
WPSDK 7.1.1
Matt Lacey
 
Android - Preventing common memory leaks
Android - Preventing common memory leaks
Ali Muzaffar
 
Memory management for_android_apps
Memory management for_android_apps
Bin Shao
 
Using and Extending Memory Analyzer into Uncharted Waters
Using and Extending Memory Analyzer into Uncharted Waters
Vladimir Pavlov
 
Effective memory management
Effective memory management
Yurii Kotov
 
Effective memory management
Effective memory management
Denis Zhuchinski
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
CommonsWare
 
EclipseMAT
EclipseMAT
Ali Bahu
 
Memory management
Memory management
mitesh_sharma
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский
Fwdays
 
Eclipse Memory Analyzer Tool
Eclipse Memory Analyzer Tool
littleeye
 
Memory Analyzer Tool (MAT)
Memory Analyzer Tool (MAT)
Samiullah Farooqui
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
Yossi Elkrief
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
Padma shree. T
 
Ps ts 4118-304118_230-1_fin_v1
Ps ts 4118-304118_230-1_fin_v1
AJohnson1
 
Catch Leak If You Can
Catch Leak If You Can
Paulina Szklarska
 
Practical lessons in memory analysis
Practical lessons in memory analysis
AJohnson1
 
Sporar
Sporar
oscon2007
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVM
Rafael Winterhalter
 
Memory Leak Analysis in Android Games
Memory Leak Analysis in Android Games
Heghine Hakobyan
 
Memory problems in android programming
Memory problems in android programming
AiTi Education
 
Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 

More Related Content

Similar to Detecting Memory Leaks in Android App (20)

Memory management for_android_apps
Memory management for_android_apps
Bin Shao
 
Using and Extending Memory Analyzer into Uncharted Waters
Using and Extending Memory Analyzer into Uncharted Waters
Vladimir Pavlov
 
Effective memory management
Effective memory management
Yurii Kotov
 
Effective memory management
Effective memory management
Denis Zhuchinski
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
CommonsWare
 
EclipseMAT
EclipseMAT
Ali Bahu
 
Memory management
Memory management
mitesh_sharma
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский
Fwdays
 
Eclipse Memory Analyzer Tool
Eclipse Memory Analyzer Tool
littleeye
 
Memory Analyzer Tool (MAT)
Memory Analyzer Tool (MAT)
Samiullah Farooqui
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
Yossi Elkrief
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
Padma shree. T
 
Ps ts 4118-304118_230-1_fin_v1
Ps ts 4118-304118_230-1_fin_v1
AJohnson1
 
Catch Leak If You Can
Catch Leak If You Can
Paulina Szklarska
 
Practical lessons in memory analysis
Practical lessons in memory analysis
AJohnson1
 
Sporar
Sporar
oscon2007
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVM
Rafael Winterhalter
 
Memory Leak Analysis in Android Games
Memory Leak Analysis in Android Games
Heghine Hakobyan
 
Memory problems in android programming
Memory problems in android programming
AiTi Education
 
Memory management for_android_apps
Memory management for_android_apps
Bin Shao
 
Using and Extending Memory Analyzer into Uncharted Waters
Using and Extending Memory Analyzer into Uncharted Waters
Vladimir Pavlov
 
Effective memory management
Effective memory management
Yurii Kotov
 
Effective memory management
Effective memory management
Denis Zhuchinski
 
Tuning Android Applications (Part One)
Tuning Android Applications (Part One)
CommonsWare
 
EclipseMAT
EclipseMAT
Ali Bahu
 
"Avoiding memory leaks in Android" Денис Жучинский
"Avoiding memory leaks in Android" Денис Жучинский
Fwdays
 
Eclipse Memory Analyzer Tool
Eclipse Memory Analyzer Tool
littleeye
 
Android Memory , Where is all My RAM
Android Memory , Where is all My RAM
Yossi Elkrief
 
TechGIG_Memory leaks in_java_webnair_26th_july_2012
TechGIG_Memory leaks in_java_webnair_26th_july_2012
Ashish Bhasin
 
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
Padma shree. T
 
Ps ts 4118-304118_230-1_fin_v1
Ps ts 4118-304118_230-1_fin_v1
AJohnson1
 
Practical lessons in memory analysis
Practical lessons in memory analysis
AJohnson1
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVM
Rafael Winterhalter
 
Memory Leak Analysis in Android Games
Memory Leak Analysis in Android Games
Heghine Hakobyan
 
Memory problems in android programming
Memory problems in android programming
AiTi Education
 

Recently uploaded (20)

Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Software Testing & it’s types (DevOps)
Software Testing & it’s types (DevOps)
S Pranav (Deepu)
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
How to Choose the Right Web Development Agency.pdf
How to Choose the Right Web Development Agency.pdf
Creative Fosters
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
SAP Datasphere Catalog L2 (2024-02-07).pptx
SAP Datasphere Catalog L2 (2024-02-07).pptx
HimanshuSachdeva46
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Rierino Commerce Platform - CMS Solution
Rierino Commerce Platform - CMS Solution
Rierino
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Software Testing & it’s types (DevOps)
Software Testing & it’s types (DevOps)
S Pranav (Deepu)
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
How to Choose the Right Web Development Agency.pdf
How to Choose the Right Web Development Agency.pdf
Creative Fosters
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
SAP Datasphere Catalog L2 (2024-02-07).pptx
SAP Datasphere Catalog L2 (2024-02-07).pptx
HimanshuSachdeva46
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Ad

Detecting Memory Leaks in Android App

Editor's Notes

  • #2: Talk about RAM usage vs resolution
  • #3: Helllo
  • #5: Talk about heap size, manifest settings for largerheap
  • #7: Talk about logcat messages for memory analysis, Heap dumps