IA
There are two possible attributes: const, which declares a constant variable, that is, a variable that cannot be assigned to after its initialization; and toclose, which declares a to-be-closed variable
Size: a a a
IA
IA
IA
IA
IA
IA
local <toclose> a = 34;можешь вот это проверить?
setmetatable( a, { __close = function() print("a") end }
IA
IA
local <toclose> a = {};
setmetatable( a, { __close = function() print("a") end })IA
local <toclose> a = {};
setmetatable( a, { __close = function() print("a") end })
setmetatable( a, { __gc = function() print("gc a") end })IA
a
gc a
IA
IA
IA
mt = {}
mt.__close = function() print("close a") end
mt.__gc = function() print("gc a") end
local <toclose> a = {}
setmetatable(a, mt)