in reply to Object reference disappearing during global destruction
It's like some invisible hand reaches into the system between two of the many, many DESTROY calls, and yanks out that (and only that) reference.
Yep. Unfortunately, global destruction is a free-for-all, and you can't count on any sane order of destruction. Perhaps the best option you have is to add an explicit non-DESTROY destructor called manually. (If you're clever, tie it to one of the end-of-scope-action modules on the CPAN, pun intended.)
Reference counting is all well and good, but at the end of the interpreter, Perl yells "Everybody out of the pool!" and occasionally someone'll leave his little locker key behind in the ensuing madness.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Object reference disappearing during global destruction
by khkramer (Scribe) on May 15, 2002 at 19:24 UTC | |
by chromatic (Archbishop) on May 15, 2002 at 20:54 UTC | |
by erikharrison (Deacon) on May 16, 2002 at 04:34 UTC |