lua-users home
lua-l archive

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


> What happens if the only reference to a coroutine is stored
> in its own stack? Is it going to be garbage collected or not?
> 
>   struct lua_State *child_L = lua_newthread(L);
>   lua_xmove(L, child_L, 1);

It will. For the garbage collector, this is a cycle just like a table
referring itself.

-- Roberto