[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tolua memory leak?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 02 May 2001 18:08:50 -0300
int gc_tagmethod(lua_State* L) {
lua_pushuserdata(L, (void*) 0xbeef); // leak is a side-effect from here!
lua_pop(L, 1);
return 0;
This is a "deficiency" of Lua. You cannot create new Lua objects during
a gc tagmethod (that is why we restricted the use of gc tagmethods in
later versions). But I am afraid the manual has a bug of not stating
this restriction clearly.
-- Roberto