【发布时间】:2015-10-23 15:13:12
【问题描述】:
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 Profiler 来帮助我检测 内存泄漏 的位置。因为我使用 NetBeans 来开发我的应用程序,所以我决定使用它的嵌入式分析器。
@MuhammadGhazanfar 给了我这个非常有用的链接: Best way to profile memory usage in a Java application?
感谢您的宝贵时间和所有帮助。
【问题讨论】:
标签: java exception out-of-memory heap-memory