问题描述
我期待所有在互联网上\ Goolge的\计算器,但没有找到充分而简单的指导,可以向我解释我怎么能找到,如果我的Android应用程序有内存泄漏。任何人都可以向我解释如何做到这一点,甚至更好的给我很好的指导作用呢?
I look all over the internet\goolge\stackoverflow and couldn't find full and simple guide that can explain to me how can I find if my android app has a memory leak.Can anyone explain to me how to do it, or even better give me good guide for it?
我的应用程序收集关于电池的数据并保存到数据库的电话。每一次,他们是在电池(ACTION_BATTERY_CHANGED)我检查的变化,如果电池precentage改变,在这种情况下,我保存了一些数据。
My app collecting data about the battery and saves it to DB on the phone.Each time that their is a change in the battery (ACTION_BATTERY_CHANGED) I check if the battery precentage changed and in this case I save some data.
此应用程序需要(25-30)MB的RAM,我认为这是太多这种简单app.I怀疑它有内存泄漏。
This app takes (25-30)MB RAM I think that this is too much for such simple app.I suspect that it has a memory leak.
推荐答案
您可以使用MAT
这是一个非常好的工具,使您的项目与内存泄漏链接的基本信息很详细的报告
It is a very good tool and gives very detailed report of your project with basic information linked with memory leaks
MAT中的Android
MAT in Android
http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html
如何使用MAT
http://kohlerm.blogspot.in/2009/07/eclipse-memory-analyzer-10-useful.html
http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html
http://ttlnews.blogspot.in/2010/01/attacking-memory-problems-on-android.html
Eclipse集成MAT的
Eclipse integration of MAT
http://www.eclipse.org/mat/downloads.php
http://www.eclipse.org/forums/index.php/m/878338/
更新网站:http://download.eclipse.org/mat/1.1/update-site/
Eclipse集成BERT(依赖本)的
Eclipse integration of BERT (dependency on this )
http://wiki.eclipse.org/BIRT_Update_Site_URL
http://download.eclipse.org/birt/update-site/3.7-interim
这篇关于我如何能确定我的Android应用程序有内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!