您如何使用 Netbeans 分析器发现内存泄漏? [英] How do you find memory leaks using the Netbeans profiler?

查看:30
本文介绍了您如何使用 Netbeans 分析器发现内存泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 Java 应用程序中查找内存泄漏,但我不知道如何使用 Netbeans 分析器来做到这一点.

解决方案

网络上有多种资源可以帮助您

http://www.javapassion.com/handsonlabs/nbprofilermemory/>

http://www.netbeans.org/kb/articles/nb-profiler-uncoveringleaks_pt1.html

http://kirk.blog-city.com/more_on_memory_leaks.htm

简而言之,您监视幸存的生成器",即应用程序保存在内存中的对象.

当你看到这个指标失控时,你可以切换到内存实时分析模式,通过幸存的生成器对类进行排序,然后用鼠标右键单击选择显示分配堆栈跟踪"选项

I want to find memory leaks in my java application but I don't know how to use Netbeans profiler to do that.

解决方案

There are several resources on the web that can give you a hand

http://www.javapassion.com/handsonlabs/nbprofilermemory/

http://www.netbeans.org/kb/articles/nb-profiler-uncoveringleaks_pt1.html

http://kirk.blog-city.com/more_on_memory_leaks.htm

In a nutshell, you monitor the "surviving generators", objects that are kept in the memory by your application.

When you see that this metric gets out of hand, you can switch to the Memory Live profiling mode, sort the classes by surviving generators and then with the right click mouse button select the "Show Allocation Stack Traces" option

这篇关于您如何使用 Netbeans 分析器发现内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆