Eclipse:垃圾收集器按钮 [英] Eclipse: Garbage Collector Button
本文介绍了Eclipse:垃圾收集器按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我按下Eclipse中的运行垃圾收集器按钮时会发生什么?是否只是调用System.gc()?
解决方案
是的,它是严格调用JVM,而不是内部Eclipse函数(请参阅此主题)。不要忘记 内存分析器 还可以检查到垃圾回收根的路径(如果您怀疑Eclipse会话中存在一些内存泄漏。
注意:该按钮仅在常规中选择显示堆状态时可用Eclipse首选项的一部分:
What happens when I press the "Run Garbage Collector" button in Eclipse? Does it just call System.gc()?
解决方案
Yes, it is strictly a call to the JVM, not to an internal Eclipse function (see this thread).
Don't forget the Memory Analyzer to also check paths to garbage collection roots (in a Head Dump) if you suspect some memory leaking in your Eclipse session.
Note: that button is only available if you select the "Show Heap status" in the General section of the Eclipse preferences:
这篇关于Eclipse:垃圾收集器按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文