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

global destruction and tie-s

Thread Previous
Nick Ing-Simmons
March 22, 2000 09:49
global destruction and tie-s
Message ID:

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About