lua-users home
lua-l archive

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

2011/6/27 Jerome Vuarand <>
2011/6/27 steve donovan <>:
> On Mon, Jun 27, 2011 at 11:08 AM, Gaspard Bucher <> wrote:
>> collectgarbage() ---- does not collect old "foo". Why ? Where is it stored ?
>> print('end') -- the garbage collection after 'end' removes old "foo".
> It's still there, as a global of the original environment.

But the original environment is unreachable (except by the gc_mt.__gc
function itself), and it should be collected.

It can touched by registry table in C API. see LUA_RIDX_GLOBALS.