lua-users home
lua-l archive

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


> if there's no other references, Lua will GC module table. so you can
> set your own GC handler and do necessary cleanup.

You cannot set __gc for tables. But you can say use a udata as upvalue for
all functions registered in the module and then clean up when that udata
is collected.