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

More Related Content

PPTX
Memory leak
PDF
Memory Leak In java
PDF
Memory Leaks in Android Applications
PDF
Identifying memory leaks in Android applications
PPTX
Android Performance Best Practices
PDF
10 ways to improve your Android app performance
PPTX
WPSDK 7.1.1
PPTX
Android - Preventing common memory leaks
Memory leak
Memory Leak In java
Memory Leaks in Android Applications
Identifying memory leaks in Android applications
Android Performance Best Practices
10 ways to improve your Android app performance
WPSDK 7.1.1
Android - Preventing common memory leaks

Similar to Detecting Memory Leaks in Android App (20)

ODT
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
PPTX
Android Memory Management
PDF
Profiling tools and Android Performance patterns
PDF
Effective memory management
PDF
Effective memory management
PDF
performance optimization: Memory
PDF
TechGIG_Memory leaks in_java_webnair_26th_july_2012
PDF
"Avoiding memory leaks in Android" Денис Жучинский
PPTX
How to do Memory Optimizations in Android
PPTX
Coding Best Practices For Memory Management
PDF
EESTEC Android Workshops - Recap
PDF
SWTT 140407 session04
PDF
Performance optimization for Android
PPTX
Leakcanary tool
PDF
Memory Heap Analysis with AppDynamics - AppSphere16
PDF
A healthy diet for your Java application Devoxx France.pdf
PPTX
Сергей Жук "Android Performance Tips & Tricks"
PPTX
Android Performance Tips & Tricks
PDF
The Good, the Bad and the Ugly things to do with android
DOCX
Library Managemnet System
ACADGILD:: ANDROID LESSON-How to analyze & manage memory on android like ...
Android Memory Management
Profiling tools and Android Performance patterns
Effective memory management
Effective memory management
performance optimization: Memory
TechGIG_Memory leaks in_java_webnair_26th_july_2012
"Avoiding memory leaks in Android" Денис Жучинский
How to do Memory Optimizations in Android
Coding Best Practices For Memory Management
EESTEC Android Workshops - Recap
SWTT 140407 session04
Performance optimization for Android
Leakcanary tool
Memory Heap Analysis with AppDynamics - AppSphere16
A healthy diet for your Java application Devoxx France.pdf
Сергей Жук "Android Performance Tips & Tricks"
Android Performance Tips & Tricks
The Good, the Bad and the Ugly things to do with android
Library Managemnet System
Ad

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Introduction to Artificial Intelligence
PPTX
assetexplorer- product-overview - presentation
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administraation Chapter 3
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Nekopoi APK 2025 free lastest update
PDF
Digital Strategies for Manufacturing Companies
PDF
Softaken Excel to vCard Converter Software.pdf
PPT
Introduction Database Management System for Course Database
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Operating system designcfffgfgggggggvggggggggg
Digital Systems & Binary Numbers (comprehensive )
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Introduction to Artificial Intelligence
assetexplorer- product-overview - presentation
ai tools demonstartion for schools and inter college
System and Network Administraation Chapter 3
VVF-Customer-Presentation2025-Ver1.9.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Nekopoi APK 2025 free lastest update
Digital Strategies for Manufacturing Companies
Softaken Excel to vCard Converter Software.pdf
Introduction Database Management System for Course Database
How to Choose the Right IT Partner for Your Business in Malaysia
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
CHAPTER 2 - PM Management and IT Context
Ad

Detecting Memory Leaks in Android App

  • 2. ● What is memory leak? ● Tools : MAT(Eclipse Memory Analyzer) ● How to detect Memory leak in Android
  • 3. “App expands to fill the memory available” - From Dinesh Prajapati
  • 4. 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
  • 5. Visual Reference objects but not exactly used Not considered as Unreferenced objects GC can not happen Stays in memory for longer
  • 6. 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.
  • 7. 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
  • 8. 12,256 No of questions on stackoverflow.com for memory leaks

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