java - "byte[]"加载的 "<system class loader>"的一个实例占用 29,393,296 (40.58%) 字节

标签 java android eclipse analyzer eclipse-memory-analyzer

为什么?

how to solve? byte[] need to set null? Eclipse Memory Analyzer

enter image description here

最佳答案

这个问题的答案取决于你如何在应用程序中使用 byte[] 的代码。

如何解决?

  • 检查您正在初始化 byte 数组的应用程序
  • 在循环迭代中重复使用数组元素
  • 在不使用时使数组引用无效

检查带有标签的 logcat 消息:dalvikvm 并运行您的应用程序。检查哪里

D/dalvikvm(28039): GC_CONCURRENT freed 473K, 7% free 9503K/10180K, paused 2ms+3ms, total 22ms

在这里,观看田野 -

  1. 7% 免费 9503K/10180K -

9503K is amount which is holding live object references in our application. As you traverse inside your application, this value will grow up. This is normal. BUT parallely GC is also running and trying to free resources/object references which are not strongly connected. If you do not find value 9503K go down then this is warning to us. This is signal that our application is certainly leaking memory.

关于内存优化的细节,你应该查看Google IO video for memory optimization and using mat tool of eclipse

关于java - "byte[]"加载的 "<system class loader>"的一个实例占用 29,393,296 (40.58%) 字节,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29794007/

相关文章:

java - 使用 DISC 框架的 weblogic portlet 的 AJAX 消费

java - 使用大量列在 Scala 中转换数据框行

java - 两个线程死锁但不明白为什么,用 notifyAll() 释放了锁

android - 如何检查android设备是根设备?

android - Firebase token 错误 TOO_MANY_REGISTRATIONS

java - ClassNotFoundException 使用Processing's PApplet 和 Arduino 工具

java - 使用 FlyingSaucer 从 HTML 模板生成 PDF 证书时,我的背景周围有白色边框

android - 滑动即可完成 Activity 模式

eclipse - 在 Eclipse 中调试 Clojure

Eclipse IDE - Open Call Hierarchy 为空/损坏