Why are there two different results if I debug or run it? Why are there two different results if I debug or run it? tkinter tkinter

Why are there two different results if I debug or run it?


Finally I find my problem.Like this said,I keep reference.xx.image = img1And solve my problem.But what really makes me confused is that why debugger won't use garbage collection.