lua-users home
lua-l archive

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

Luiz Henrique de Figueiredo wrote:

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
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.

Jan Kratochvil
Illusion softworks, a.s