At 9:19 AM +0200 4/30/05, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
 > ... 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.

Nope, I don't think so. There's really only one action -- "You are dead. Go clean up after yourself" -- that PMCs should be getting. There's no need to clean up memory since we do that for you automatically, and if you have to release memory back to a third-party library it's part of the cleaning up after yourself bit.


I can't really think of a reason to have two cleanup actions. Maybe I'm missing something here.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to