|
Luiz Henrique de Figueiredo wrote:
Well, but how? I create it using lua_newthread and so i have only pointer to lua_state. I suppose that mainthread somehow holds reference to this thread but i don't know how to eliminate this reference.I don't know how to mark this coroutine to be garbage collectable?A coroutine is just like any other Lua value: it is collected when no references exist for it. So, just make sure no such references exist and it'll be collected. --lhf
Jan Kratochvil Illusion softworks, a.s