[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua vs LuaJIT, compatibility on GC behaviour for weak tables
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 1 Feb 2011 16:29:12 -0200
> 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