Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
No. The DESTROY function will be called immediately after the last reference to the object goes out of scope. This is fairly similar to what C++ seemingly does, but only in the case where no references escape that scope. See Scope::Guard, Guard and similar classes that use this mechanism to ensure cleanup of resources when a scope is left. Update: Also, the "SEE ALSO" section of Scope::Guard mentions many other modules that implement the same approach. In reply to Re: DESTROY Function call
by Corion
|
|