Arraylist issue - Out of memory error

纵饮孤独 提交于 2020-01-06 06:10:49

问题


I am adding a parsed value to an ArrayList. I am getting a lot of parsed values in webservice. Because of this, I am getting an out of memory error. How do I avoid this?


回答1:


increase heap memory by

-Xms64m -Xmx256m




回答2:


You are holding to many values in memory, find a way to store some of the data outside of memory so you can keep processing values without having to raise the amount of memory you use.



来源:https://stackoverflow.com/questions/5066155/arraylist-issue-out-of-memory-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!