Java JProfiler:查找内存泄漏引用名称
我正在尝试将JProfiler用于在tomcat服务器下运行的一个应用程序 因此,我编写了一个内存泄漏servlet,如下所示Java JProfiler:查找内存泄漏引用名称,java,profiling,jprofiler,Java,Profiling,Jprofiler,我正在尝试将JProfiler用于在tomcat服务器下运行的一个应用程序 因此,我编写了一个内存泄漏servlet,如下所示 @SuppressWarnings(value = { "" }) public class Dust extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,
@SuppressWarnings(value = { "" })
public class Dust extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String str = new String();
List myarrylist = new ArrayList();
int i = 10;
while (true) {
myarrylist.add(str);
System.out.println(i);
i++;
}
}
}
现在,当我使用本地运行的profileweb应用程序在这个应用程序上运行JProfiler时。
它给了我这种观点。请看这里的屏幕截图
我有以下问题:
请帮忙。多谢各位 你必须使用堆遍历器来实现这一点。动态内存视图无法显示有关引用的任何信息,因为必须创建快照
有关如何使用JProfiler查找内存泄漏的更多信息,请参阅。任何人都可以帮助我。非常感谢您的链接。这很有帮助。