Dan Sugalski <[EMAIL PROTECTED]> wrote:

>>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.

Yeah.

> ... 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.

That sounds sane. Or maybe be: convert to an Undef and put a Null PMC
vtable into it which would catch any further access to that PMC.

BTW shouldn't we really separate C<destroy> and C<finalize>? The latter
would be overridable by user code, the former frees allocate memory.

leo

Reply via email to