views:

195

answers:

2

I have developed a simple application before testing it i want to check whether any memory leaks are there in the application. I don't know how to identify the leaks in Android. I am using Eclipse IDE for development.

Is there a good introduction into finding memory leaks in Android apps somewhere?

A: 

Once you test an application through the Eclipse Emulator, you will be informed about any memory leaks by going through the LogCat.

Any memory leaks will be highlighted in red as far as I know.

Kev

Kevin Bradshaw
No. Exceptions will be shown in red. Sometimes if you are leaking an object that android knows about it will throw an exception. If there is nothing in logcat your app can still have a lot of "leaked" memory
Janusz
Sorry Jansuz, I cant agree with that... I have discovered many leaks from open cursors and the likes that have not thrown an exception but that have shown up in the logcats.
Kevin Bradshaw
+1  A: 

MAT plugin for eclipse, Just install it and click "Dump HPROF" button in Eclipse.
http://www.eclipse.org/mat/
http://kohlerm.blogspot.com/2009/04/analyzing-memory-usage-off-your-android.html http://kohlerm.blogspot.com/2010/02/android-memory-usage-analysis-slides.html http://kohlerm.blogspot.com/search/label/memory

Fedor
Thanks for the reply.I tried it but failed to install it. It is showing some error. Can you give me the right link to download the MAT plug-in.
Rajapandian