java.lang.OutOfMemoryError: Java heap space

前端 未结 11 1085
温柔的废话
温柔的废话 2020-11-22 08:01

I am getting the following error on execution of a multi-threading program

java.lang.OutOfMemoryError: Java heap space

The above error occu

11条回答
  •  鱼传尺愫
    2020-11-22 08:39

    1. In most of the cases, the code is not optimized. Release those objects which you think shall not be needed further. Avoid creation of objects in your loop each time. Try to use caches. I don't know how your application is doing. But In programming, one rule of normal life applies as well

      Prevention is better than cure. "Don't create unnecessary objects"

提交回复
热议问题