develooper Front page | perl.perl6.internals | Postings from April 2005

Re: parrot and refcounting semantics

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
April 29, 2005 12:12
Subject:
Re: parrot and refcounting semantics
Message ID:
a06210201be98363dde1f@[192.168.0.8]
At 3:05 PM +0200 4/29/05, Leopold Toetsch wrote:
>Gerald Butler <gerald.butler@jewels.com> wrote:
>
>>  Isn't there something like:
>
>>	{
>>		my $s does LEAVE { destroy $s } = new CoolClass;
>>		# ... do stuff that may throw ...
>>	}
>
>>  Or something like that?
>
>Not currently. There used to be a C<destroy> opcode, but I've deleted
>it, because I thought it's too dangerous.

We really need to put it back in -- I knew it was dangerous, but it 
was necessary. We should probably make it 'safe' by forcing the 
destroyed PMC to be an Undef after destruction, in case something was 
still referring to it.

-- 
				Dan

--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

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