[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Exceptions (was Re: Custom extensions to Lua)
- From: "Adam D. Moss" <adam@...>
- Date: Fri, 12 Aug 2005 22:01:32 +0100
David Given wrote:
Lua gets away with __gc because it has very restricted functionality;
finalisers can only be written in C, the finalised objects can't be
resurrected, the finalisers can't block, etc. IMO, this is a Very Good Thing.
I'm not sure the above is exactly true. It's perfectly safe for
the C finaliser to call back into Lua, and I've got a feeling that
the finalised objects can indeed be resurrected - at least
there's no documented warning, IIRC, about making a new long-living
ref to the object in question, within the finaliser.
Adam D. Moss - email@example.com