lua-users home
lua-l archive

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


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 example:

    for k, v in pairs( t ) do
        t[ k ] = nil
        ... Drive the GC forward ...
    end

Mark