in reply to Catching an object going out of scope
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Catching an object going out of scope
by gildir (Pilgrim) on Nov 13, 2001 at 13:50 UTC |