This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author idiscovery
Recipients
Date 2002-11-07.09:22:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=33229

> When the BitmapImage object is no longer referenced, it is
> finalized; finalization causes "image delete" to be
> invoked.

Martin, thanks for the explanation. The behaviour is
counterintuitive for a Tk wrapper, because in Tk images are
eternal unless explicitly deleted. They are not GC'd when
they are unreferenced, and that's their documented behaviour.

IThe documentation I was refering to was the Image class 
documentation in Tkinter.py - it makes no mention of this,
and as a rule in Python, I didn't think you had to keep a
global reference to everything you pass to any function if
you want it to be still alive when the function uses it.
Perhaps the Label/Canvas/Button instances should keep a
reference to it, which would be deleted when the  instance
is deleted?

I know it's not in the Library Reference, as I contributed
the Tkinter section, but I think it should be clear in
Tkinter.py.
History
Date User Action Args
2007-08-23 14:07:45adminlinkissue632323 messages
2007-08-23 14:07:45admincreate