Why does BufferedImage setRGB consumes memory?