lua-users home
lua-l archive

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


On Mon, Jul 16, 2018, at 03:00, Andrew Starks wrote:
What about calling collectgarnage(“collect”)?

In some system I did that in a global error handler (top-level pcall) to avoid problems. However that forces collection of all garbage, not a single object. I wouldn't do it after a for loop, for instance. Also that doesn't work (or isn't easy to write) if you call `return`.

-- 
Pierre Chapuis