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 loewis
Recipients
Date 2002-11-07.10:11:11
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=21627

It is now in the library section. If you think it also ought
to be in the Image class, please contribute a patch.
However, I think anybody looking at the Image class code
could not fail to notice the image delete.

I agree that the behaviour is counter-intuitive, but I
disagree that automatic addition of a reference would be a
solution:
1. It would break backwards-compatibility. A number of text
books explicitly
    mention this issue, and applications make use of this
property, relying on
    the fact that you can drop the last reference to the
image and thus release
    the associated memory.

2. Python cannot possibly track all uses of the command. For
example, you
    could put the image into a StrVar, and then expect to
use the StrVar as the
    value for an image= attribute.

So in short, I think educating users is the best we can do,
until Tk provides better mechanisms.
History
Date User Action Args
2007-08-23 14:07:45adminlinkissue632323 messages
2007-08-23 14:07:45admincreate