|
The automatic garbage collection in Lua, Java, C# etc. does not require you to do any of that, but it has a lot more overhead and does not free memory instantly, which is why the "<close>" facility was added in Lua 5.4.0.
No, __newindex can be used to block adding new keys, but you can still delete keys or modify the associated value. You can make a proxy table that blocks all modifications. This creates some overhead, though, and 'rawset' etc. will still ignore the readonly status.
_______________________________________________ lua-l mailing list -- lua-l@lists.lua.org To unsubscribe send an email to lua-l-leave@lists.lua.org