• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua ¿¿ Why all not use the collectgarbage() ?? [] []

Madlander

Madlander
Joined
Sep 16, 2009
Messages
317
Reaction score
15
Location
Mexico
I tested the garbage collector in several samples of "full-use memory" and this tool is very nice :p

My test:
print( gcinfo())
A={}
for i=1,1000000 do
A=i
end
print( gcinfo())
collectgarbage ("collect")
print( collectgarbage("count"))


¿¿What is the Garbage Collector??
SEE:Lua for Beginners
 
Feel free to use it, but the program itself [should] run the garbage collector itself, automatically, already.

It'll clean stuff from the memory like unassigned tables, strings etc.
 
Back
Top