lua-users home
lua-l archive

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

> But this is not a compatibility question. Specific GC behavior is
> undocumented on purpose. It's completely up to the GC to decide
> when to release an object (or if at all) or when to clear a weak
> table entry. There are no other rules. Period.

Standard Lua ensures that when an object finalizer runs, that object has
already been removed as a value from weak tables, but it has not been
removed as a key. The 5.1 manual does not mention that, but we tried to
make that clear in the 5.2 manual.

-- Roberto