develooper Front page | perl.perl5.porters | Postings from March 2000

global destruction and tie-s

Thread Previous
From:
Nick Ing-Simmons
Date:
March 22, 2000 09:49
Subject:
global destruction and tie-s
Message ID:
E12XpG8-0002fp-00@mserv1a.u-net.net

I just tracked down another weirdness in Tk's exit behaviour.
The case in point was both a script and a Tk error, but the trail
lead though global destruction with a 

tie \*STDIN,'Tk::Event::IO',...

still in force (script bug). There was a reference loop - the object implementing the 
tie had a refrerence to the handle (which of course had a reference to 
the object) - so nothing happend until clean_objs time. Then perl 
decided to cleanup some sub-structure (callbacks again) of the object before 
the object - and that caused Tk indigestion (Tk bug).

I _think_ things would have been cleaner if ties were broken before
perl took a chainsaw to the reference loops.  

Has anyone considered a sv_clean_ties() phase to cleanup ?


-- 
Nick Ing-Simmons


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About