Free memory for all images