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

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

Thread Previous | Thread Next
From:
Simon Cozens
Date:
February 14, 2001 11:45
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
20010214194453.A1216@pembro26.pmb.ox.ac.uk
On Wed, Feb 14, 2001 at 08:32:41PM +0100, abigail@foad.org wrote:
> > DESTROY would get called twice, which is VERY BAD.
> 
> *blink*
> It is? Why?
> I grant you it isn't the clearest way of programming, but "VERY BAD"?

package NuclearReactor::CoolingRod;

sub new {
    Reactor->decrease_core_temperature();
    bless {}, shift
}

sub DESTROY {
    Reactor->increase_core_temperature();
}

-- 
diff: usage diff [whatever] etc.
    - plan9 has a bad day

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About