lua-users home
lua-l archive

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


Lua garbage-collects its memory. Every time the total used memory reaches a 
limit (twice the total memory in use at the end of the previous 
garbage-collection cycle), Lua collects the garbage. Usually this method 
works very well, but you can force an immediate garbage-collection cycle 
calling "collectgarbage()" from Lua (or lua_collectgarbage() from C). Of 
course you will pay a price in performance if you call this function too 
often. 

-- Roberto