lua-users home
lua-l archive

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

>>>>> "Dibyendu" == Dibyendu Majumdar <> writes:

 >> Calling 'collectgarbage' twice frees all memory not in use by Lua.

 Dibyendu> Why twice?

As I understand it, after the first call, unreferenced objects with
finalizers have had the finalizer called, but the object itself is not
freed until the next GC pass (since it had to be revived in order to
run the finalizer, and it's not known if the finalizer stored any
reference to it until we do another full mark/sweep cycle).

 Dibyendu>  Also is this true of both incremental / generational modes,
 Dibyendu> as well as of Lua 5.3?