BufferedImage leaks - are there any alternatives?

折月煮酒 提交于 2019-12-04 15:52:46

There are some known bugs related to ImageIO.read() and BufferedImage

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166379

http://bugs.sun.com/view_bug.do?bug_id=6716560

There is definitely something wrong with BufferedImage - I've tested it on two servers and it was leaking with the same results - System completely out of memory.

In the end I've written a simple wrapper over PHP and I now use GD for image manipulation. Works fine now. Thanks for all the suggestions!

ssedano

Try moving the code to java.nio and memory mapped file access. Those are stored outside the heap.

This SO is interesting.

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