I won't characterize this as (much) more than a wild guess,
but I'll throw it out here anyway because sometimes that
just motivates someone to correct me.
Tk uses a lot of XS code and a lot of people that write XS
code don't understand reference counting (especially when
using "mortal" variables). If you make your reference
counts too small, then things get free()d too soon and
you notice. If you make your reference counts too big,
then stuff hangs around forever and you don't notice
unless you "go out of your way" to test for memory leaks
(which you should do when writing XS code that creates
Perl data items).
So, anyway, back to the wild allegations. I suspect that
Tk's XS code often sets reference counts too high which
causes things to never be destroyed. I've certainly put
in DESTROY methods and never gotten them to fire once Tk
has a reference to that object.
-
tye
(but my friends call me "Tye")
|