lua-users home
lua-l archive

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

You'd think that Lua source code is unavailable if you read this thread. The finalizer implementation is fairly simple to understand:
If you call 'setmetatable' in the finalizer, and that metatable has a '__gc' field the object is moved back to the 'finobj' list, so the process starts again and the object is never freed.

"It's not a bug, it's a feature!"