Is there a way to make Lua to collect garbage more frequently?
It seems Lua hardly frees garbages in my app so the memory rises really high (over 500MB). The memory rises quickly especially when I declare many variables inside a large loop.
I know I can manually call collectgarbage() but people say I should almost never call this function.
Therefore I wonder if there's any option to make the garbage collector to automatically run more frequently.
ADDED: if there's no way to do this, I would like to know if it's possible to get the memory usage in Lua so I can call collectgarbage() when needed.