我如何能确定我的Andr​​oid应用程序有内存泄漏? [英] How can I determine if my android app has memory leak?

查看:89
本文介绍了我如何能确定我的Andr​​oid应用程序有内存泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待所有在互联网上\ Goolge的\计算器,但没有找到充分而简单的指导,可以向我解释我怎么能找到,如果我的Andr​​oid应用程序有内存泄漏。 任何人都可以向我解释如何做到这一点,甚至更好的给我很好的指导作用呢?

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中的Andr​​oid

MAT in Android

<一个href="http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html">http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html

如何使用MAT

<一个href="http://kohlerm.blogspot.in/2009/07/eclipse-memory-analyzer-10-useful.html">http://kohlerm.blogspot.in/2009/07/eclipse-memory-analyzer-10-useful.html

<一个href="http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html">http://android-developers.blogspot.in/2011/03/memory-analysis-for-android.html

<一个href="http://ttlnews.blogspot.in/2010/01/attacking-memory-problems-on-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

<一个href="http://www.eclipse.org/forums/index.php/m/878338/">http://www.eclipse.org/forums/index.php/m/878338/

更新网站:<一href="http://download.eclipse.org/mat/1.1/update-site/">http://download.eclipse.org/mat/1.1/update-site/

Eclipse集成BERT(依赖本)的

Eclipse integration of BERT (dependency on this )

<一个href="http://wiki.eclipse.org/BIRT_Update_Site_URL">http://wiki.eclipse.org/BIRT_Update_Site_URL

<一个href="http://download.eclipse.org/birt/update-site/3.7-interim">http://download.eclipse.org/birt/update-site/3.7-interim

在Android的内存分析工具?

这篇关于我如何能确定我的Andr​​oid应用程序有内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆