Display display = new Display ();
Image[] images = new Image[IMAGES_TO_CREATE];
for(int i = 0 ; i < IMAGES_TO_CREATE ; i++) {
images[i] = new Image(display,800,600);
}
for(int i = 0 ; i < IMAGES_TO_CREATE ; i++) {
images[i].dispose();
}
display.dispose ();