I consider this to be a bug in Perl's "garbage collection", specifically the omniously named "global destruction" phase. During that phase, all remaining objects are destroying in a "convenient and efficient" order. That is, reference counts are ignored here.
So don't put any of your objects into global variables to avoid this problem.
Update: A pragma to request an extra step just before "global destruction" that would decrement the ref counts of all global variables by one and do any destruction trigger by that would also solve the problem with minimal impact to the Perl world.
- tye (but my friends call me "Tye")In reply to (tye)Re: How can I call other objects from my object during DESTROY
by tye
in thread How can I call other objects from my object during DESTROY
by amackey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |