BufferedImage leaks - are there any alternatives?
I am having strange problems with BufferedImage, which in some cases consumes all the free system memory (3GB, 1.5GB free). I have created a simple wrapper and I use it like this: public ImageWrapper(final byte[] bytes) throws ImageWrapperException { this(new ByteArrayInputStream(bytes)); } public ImageWrapper(final ByteArrayInputStream bis) throws ImageWrapperException { try { image = ImageIO.read(bis); bis.close(); } catch (IOException e) { throw new ImageWrapperException(e); } } (I have jsut verified that it happens even with image = ImageIO.read(file); ) I am not getting any exceptions