Heap space out of memory

前端 未结 9 1786
梦如初夏
梦如初夏 2020-11-27 04:33

My application currently consumes quite a lot of memory because it is running physics simulations. The issue is that consistently, at the 51st simulation, Java will throw an

9条回答
  •  一个人的身影
    2020-11-27 05:05

    Java is supposed to clear the heap space for you when all of the objects are no longer referenced. It won't generally release it back to the OS though, it will keep that memory for it's own internal reuse. Maybe check to see if you have some arrays which are not being cleared or something.

提交回复
热议问题