I'm not sure
rodrigo@rodrigo-Vostro-5470:~$ cat teste5.lua
N = 1.0e7
C = {}
for i=1,N do C[i] = i end
print(collectgarbage("count"))
for i=1,10*N do
local a = {1,2,3,4}
end
print(collectgarbage("count"))
rodrigo@rodrigo-Vostro-5470:~$ lua5.2 teste5.lua
262167.40917969 419
445742.6796875 696
rodrigo@rodrigo-Vostro-5470:~$ nano teste5.lua
rodrigo@rodrigo-Vostro-5470:~$ lua5.2 teste5.lua
262166.66113281 677
445487.28613281 293
rodrigo@rodrigo-Vostro-5470:~$ cat teste5.lua
collectgarbage("generational")
N = 1.0e7
C = {}
for i=1,N do C[i] = i end
print(collectgarbage("count"))
for i=1,10*N do
local a = {1,2,3,4}
end
print(collectgarbage("count"))
rodrigo@rodrigo-Vostro-5470:~$