lua-users home
lua-l archive

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


> At issue is lua_newthread().  In the description it states that it
> "pushes the thread on the stack and returns a pointer to a lua_State
> that represents this new thread". [...] Is it legal to pop it, or will
> this bring the whole edifice crumbling down around me?

Threads in Lua are subject to garbage collection too. If you pop the
new thread without storing it somewhere else, it will be eventually
collected (and the whole edifice will crumb down ;).

-- Roberto