[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[6]: lua_closethread
- From: Dmitry Shubin <emage@...>
- Date: Mon, 14 Jul 2003 12:33:34 +0400
Hello Nodir,
Monday, July 14, 2003, 10:26:36 AM, you wrote:
NT> Next code incorrect?
NT> --------
NT> lua_State *thr = lua_newthread (L);
NT> lua_pop (L, 1);
lua_setgcthreshold(L, 0);
(Add this line to force GC)
NT> lua_pushnil (thr);
Test crashes with 'access violation'.
NT> --------
NT> Ie in lua tables not exist reference to thread and it collected?
Yes.
NT> IMO, userdata stored in table. Is it correct store pointer to
NT> userdata outside lua tables? GC may change it's location?
GC may collect any value which not referenced by some table (key or
value).
Dmitry Shubin
----