android中的内存分析器工具? [英] Memory Analyzer Tool in android?
本文介绍了android中的内存分析器工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只想知道如何在 android 中使用内存分析器工具.请告诉我如何执行此操作以了解特定项目的内存泄漏.有人可以给我一个步骤明智的程序.
I just want to know how to work with Memory analyzer tool in android. Please tell me how to do this to know about memory leaks for a particular project. Can someone give me step wise procedure for this.
推荐答案
- 在 Eclipse 中打开 DDMS 透视图.
- 选择设备标签.
- 选择一个你想要转储的进程.
- 点击转储 HPROF 文件按钮.假设已安装 MAT,将进行转储并打开 MAT 窗口.
- 在向导窗口中选择Leak Suspects Report,然后点击完成.
- Open DDMS perspective in Eclipse.
- Select Devices tab.
- Choose a process you want to make a dump for.
- Click Dump HPROF file button. The dump will be made and MAT window will be opened, assuming MAT is installed.
- Choose Leak Suspects Report in the wizard window and click Finish.
仅此而已.您将看到可能泄漏的列表,但其中一些是误报.我建议您多次运行要检查泄漏的活动,然后再次运行 MAT.
That's all. You'll se a list of possible leaks, but some of them are false-positive. I recommend you to run an activity you want to check leaks in several times and then run MAT again.
这篇关于android中的内存分析器工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文