You could use the Timer class to call a method that deletes the image at a certain time.