lua-users home
lua-l archive

Re: Exceptions (was Re: Custom extensions to Lua)

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.
Regards,
--Adam
--
Adam D. Moss - adam@gimp.org

AltStyle によって変換されたページ (->オリジナル) /