can someone explain why ..
Farshid Lashkari
lashkariNO at SPAMworldviz.com
Tue Apr 25 19:07:21 EDT 2006
Schüle Daniel wrote:
> I don't understand what is the difference between commented lines
> 1 and 2
>
> with 1 uncommented and 2 commented it works as expected
> with 1 commented and 2 uncommented the picture doesn't appear
I'm not familiar with Tkinter, but it seems as thought with 2, the
"image" variable is garbage collected after the constructor of Main is
called. With 1, you save a reference to the image, so it does not get
garbage collected.
-Farshid
More information about the Python-list
mailing list