I have an object, "My::Class", that creates objects of a second type "My::Class::Temps"Ok, My::Class is a factory class for My::Class::Temps
Is there a way to capture the point where an object is going out of scope but not necessarily being deleted, such that special actions can be taken?DESTROY { } is the answer to this question in isolation but in order to automate destruction of this object automatically, you simply need to weaken the reference count. I thought gbarr had written something to do this but CPAN shows two others : Devel::WeakRef and WeakRef
In reply to Re: Catching an object going out of scope
by princepawn
in thread Catching an object going out of scope
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |