Re: 'gc' tag method
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: 'gc' tag method
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2002年3月21日 11:34:07 -0300
> 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