you can't do TempPhoto.dispose(); because TempPhoto is local to snapShot. even if it was not, and you could, disposing it is only half of the job, you also need to remove it from display list.

if...