lua-users home
lua-l archive

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


>From catunda@microlink.com.br Fri Nov 21 00:32:54 1997

>	Please someone could explain me how garbage collection work in lua.

garbage is collected only after several objetcs have been created.
garbage collection is not triggered by setting a variable to nil.
(otherwise, it could be too slow.)

>	Is this code correct?

the code is correct but doesn't do what you expect. ;-)
if you really want to see the message, call collectgarbage explicitly.
--lhf