lua-users home
lua-l archive

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



On 25-Aug-04, at 9:01 AM, Matthew Harmon wrote:

I, too, am wondering if there is a problem shutting down a state that is
currently yielded.  I can see how that would lock the ability to GC any
remaining data from that thread.

That doesn't seem very probable to me.

Another thing I do, which is probably bad, is frequently redefine functions. I'm not sure if that leaves the "old" code available for GC right away or
not.

It is garbage collectable, should work fine.

Most of the times I've been hit by seg faults during lua_close, it has
been related to either running __gc metamethods in the "wrong order" (it would be better to say that the __gc metamethods were badly written) or to other bugs in userdata __gc metamethods. Some userdata are never garbage collected
except at lua_close, so these bugs don't manifest themselves earlier.