[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Iterating weak tables in Lua 5.1?
- From: Mark Hamburg <mhamburg@...>
- Date: Wed, 01 Dec 2004 12:12:49 -0800
Further experimentation suggests that next is having trouble even when the
table isn't weak. Is it possible that Lua 5.1 does not like code that
assigns nil to table entries while iterating over the table and doing
complex work? That work shouldn't include any other changes to the table but
it might include work that drives the GC forward.
for k, v in pairs( t ) do
t[ k ] = nil
... Drive the GC forward ...