develooper Front page | perl.perl6.language | Postings from February 2001

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

Thread Previous | Thread Next
Peter Scott
February 13, 2001 10:39
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
At 06:35 PM 2/13/01 +0000, Nicholas Clark wrote:

> > This may be a naive question, but what is the benefit - aside from
> > consistency, and we don't need to rehash the litany on that - to AUTOLOAD
> > getting called for DESTROY?  I've never actually seen any code that makes
> > use of it.  I have grown somewhat tired of writing, and teaching, "return
> > if $AUTOLOAD =~ /:DESTROY$/", however.
>   sub DESTROY {}
>have the same effect but with less typing?

Sure (with debatable comments about maintainability since the declaration 
is decoupled from the reason - sub AUTOLOAD - for it being there), but the 
point still stands.
Peter Scott
Pacific Systems Design Technologies

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About