我在 logcat 中收到很多“dalvikvm: GC_CONCURRENT...”消息,并通过谷歌搜索导致我下载了 Eclipse Memory Analyzer...我已经知道如何使用它,但我不知道不知道怎么理解。我以前从未处理过内存泄漏问题,所以请耐心等待。
“泄漏嫌疑人”包括由“系统类加载器”加载的“android.content.res.Resources”、“android.graphics.Bitmap”和“org.apache.harmony.xnet.provider.jsse.TrustManagerImpl” 。我真的不知道这意味着什么,也不知道这对我有什么帮助;我什至不在我尝试制作的应用程序中使用位图。
这对我有什么帮助?
最佳答案
The "Leak Suspects" include "android.content.res.Resources", "android.graphics.Bitmap", and "org.apache.harmony.xnet.provider.jsse.TrustManagerImpl" loaded by "system class loader".
每个 Android 应用程序都有它们,代表 Android 基类分配的内存。
How is this supposed to help me?
您可以首先从您自己的类中查找对您自己的对象的引用,然后追踪它们的根源以找出是什么将这些对象保留在内存中。
您不妨观看this presentation from Google I|O 2011 ,涵盖了这个过程。
关于android - 如何分析 Android 上的堆转储?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10025174/