Exception in thread "Thread-8" java.lang.OutOfMemoryError: Java heap space
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-8"
Exception in thread "Thread-6" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap space我有个例外。有谁能帮我弄清楚为什么会发生这种异常吗?
异常没有提供在我的代码中发生这种情况的位置。
编辑:从我收到的所有答案中,我意识到我需要某种Java 来帮助我检测内存泄漏的位置。因为我正在使用NetBeans来开发我的应用程序,所以我决定使用它的嵌入式分析器.。
@MuhammadGhazanfar给了我一个非常有用的链接:分析Java应用程序中内存使用情况的最佳方法?
谢谢你的时间和你的帮助。
发布于 2015-10-23 15:18:36
它在哪里发生并不重要:它只是发生在一个需要内存的地方,而没有发现任何留下的内存。
基本上,您希望了解如何使用Java分析器--应用程序的内存使用情况概要;为了显示您正在处理的内存泄漏;或者了解实际需要多少内存;简单地说,您的应用程序在运行"java“帐户时需要比默认设置更多的内存。
https://stackoverflow.com/questions/33305807
复制相似问题