lua-users home
lua-l archive

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


> There doesn't seem to be a "__gc" call though- would I be correct in 
> assuming that it isn't there as MT doesn't really need specific cleanup 
> during garbage collection?

Yes. Anyone using MT must provide a struct to it. lrandom uses
lua_newuserdata to allocate one; this memory is fully managed by Lua.

OTOH, lgdbm uses handles provided by gdbm and so must register a gc method
for closing the databases when the handle is collected in Lua.