增加 JConsole 中的总卸载类增加
我正在使用 JConsole 监视我的应用程序,我发现总卸载类不断增加。并且堆大小和已使用的堆也在增加。一段时间后,我的应用程序崩溃了。
有谁知道为什么会发生这种情况?这是否意味着存在内存泄漏之类的情况?
谢谢
i am using JConsole monitoring my application and i found the total unload class are increasing from time to time. and the heap size and used heap are increasing too. after sometime, my application crashed.
do anyone have a idea why is this happen? does this implies there is something like a memory leak ?
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

我不认为这是内存泄漏。您是否发现 jconsole 中的堆使用量有所增加?如果类加载器被GC(或)那些被指定为软引用的类,则可能会发生类卸载。这里有一些关于为什么会发生类卸载的有趣讨论 link1 和 链接2。
I don't think it is memory leak. Are you seeing any increase in heap usage in jconsole? class unloading may happen in case where classloader is GCed (or) those classes designated as soft references. Here are couple of interesting discussion on why class unloading happens link1 and link2.