can someone explain why ..

Schüle Daniel uval at rz.uni-karlsruhe.de
Tue Apr 25 19:55:19 EDT 2006


[..]

> These are the only lines of code that reference "imageLabel":
> 
> imageLabel = Label(master = frame1, image = image)
> imageLabel.pack()
> 
> 
> Unless the constructor of Label adds a reference of itself to frame1, 
> imageLabel will also become garbage collected at the end of the 
> constructor. Are you sure this is the case?

yes, now i see it
even can frame1 be dead after __init__
it binds itself too root with

frame1 = Frame(master = root)
frame1.pack(side = LEFT)

frame1.pack may append frame1 to root's list of all
widgets, we cannot see it, but it also may not do it

Thx



More information about the Python-list mailing list