lua-users home
lua-l archive

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


I can only answer for Kahlua, which doesn't support finalizers at all, i.e. no __gc for metatables.

On Wed, Feb 11, 2009 at 5:47 PM, David Manura <dm.lua@math2.org> wrote:
On Wed, Feb 11, 2009 at 7:45 AM, Roberto Ierusalimschy wrote:
> > would the order of close calls be deterministic?
> You could trust the manual :) ... finalizers for userdata
> are called in reverse order of their creation,
> among those collected in that cycle.

Yes, I didn't realize that was specified behavior, though I wonder if
Lua reimplementations that utilize a native garbage collector (
http://lua-users.org/wiki/LuaImplementations ) correctly implement
that behavior too.