Visual vm分析内存泄漏
在我的视觉虚拟机中,我单击“sample->内存”,我一直看到“windowprincipal”类,实例数保持在 25。即使如此,现在没有人使用该应用程序。这是内存泄漏的迹象吗?
in my visual vm, i click on sample->memory, and i keep see "windowprincipal" class, instances stay at 25. even that right now nobody using the application. is this sign of memory leak?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试多次请求垃圾收集,然后再次看到此图表。如果对象实例仍然存在,那么您可以跟踪这些对象的补丁,即谁正在引用这些对象,并从中您可以评估这是内存泄漏还是只是缓存的合法对象。
Trying requesting a Garbage Collection multiple times and then see this graph again. If the object instances are still there than you can trace the patch of these objects i.e., who is referencing these objects and from that you can assess if this is a memory leak or just legitimate objects which are cached.