[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Calling back into lua from a gc method -- okay?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Dec 2002 16:22:29 +0000
> Are there any specific limitations in Lua 4.0.1 on what you can do from
> within a C function as registered gc tag method?
Yes!! Don't do anything :-))
In Lua 4.0 the gc tag methods run when Lua is kind of in the middle
of the collection. As a general rule, do as little as possible in Lua
during a gc tag method. More specifically, do not create new objects
(lua_newtable, lua_pushcfunction, etc.).