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

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

From:
Branden
Date:
February 12, 2001 07:59
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
OE46Auwsd1C5vKXCMby000062f1@hotmail.com
Sam Tregar wrote:
> On Mon, 12 Feb 2001, Dan Sugalski wrote:
> > Also, the vast majority of perl variables have no finalization
> > attached to them.
> 
> That's true, but without static typing don't you have to treat them as if
> they did?  At the very least you need to do a "is it an object with a
> DESTROY" check at block boundaries.
> 

Only because the type is static, I don't think they wouldn't be references.

    my $foo = new Baz();
    {
        my Baz $bar = $foo;
    };
    # DESTROY should be called on the object ref'd by $bar ?
    # It's still ref'd on $foo !!!

- Branden




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