I am reading 640x480 images from file system using jsr75 and converting it to an image. then I convert the image to a thumbnail Image about 56x41 and stuff them into a vector; I don't keep the 640x480 image around. After repeating this process about 10 times, stuffing each thumbnail into a vector, I read another 640x480 from file system but I get an out of memory error. I don't understand why i am getting out of memory error because I'm not keeping the 640x480 image, i'm only keeping the 56x41 thumbnail image of it in memory. what is wrong? I call System.gc() to free up the 640x480 image after I create thumbnail so I shouldn't be running out of heap.
What is wrong? any idea?