Fix memory leak
delete my unnecessary code

There is still a leak if we display more than 1 image then dismiss.
Merge branch 'text_leak_fix'