Original Post
hi everyone
i get an java.lang error about outofmemory
i make a very huge image (2500x2500) again and again
like this:
Image image = createImage(2500,2500);
Graphics gfx = image.getGraphics();
image = createImage(2500,2500);
image = createImage(2500,2500); // generates an error
how can i release the memory before i make a new one??
i try to use
image.dispose()
but it can''t (no method like that!)
also image.flush() // nothing happen
then i try to run garbage collector before create a new one,
getRuntime().gc()
still not work
is there a way to dump memory?
the problem goes same with this one: (out of memory)
int[][] veryHuge = new int[2000][2000];
// then i made more
veryHuge = new int[2000][2000]
// how to dump the first veryHuge??
oh yeah, i made very big image for making map editor
thanx this is very important to me
Best Regards,