lua-users home
lua-l archive

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


> Sorry if this has been answered before but why can't I set the 'gc' tag
> method from inside a lua program?

Because with the current implementation, plenty of things can go wrong
during a gc tag method (and then crash your program):

- your tag method may start a (recursive) GC cycle;

- you may resurect the object being collected;

- you can access other dead objects that may be already collected;

- there may be an error in your function;

There is a good chance that this will be fixed in the next version...

-- Roberto