Message13028
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. |
|
Date |
User |
Action |
Args |
2007-08-23 14:07:45 | admin | link | issue632323 messages |
2007-08-23 14:07:45 | admin | create | |
|