[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: abort a lua_newthread from C and re-use its lua_State?
- From: "Rici Lake" <lua@...>
- Date: Sun, 29 Apr 2007 15:46:08 +0100 (BST)
Graham Wakefield wrote:
> That's really too bad; here's my vote for adding the thread reset API.
>
> So, if I can't re-use the thread, how can I at least free it to allow
> its resources and variables allocated to be collected? Is this
> possible?
If there are no references to it, and it has references to things
otherwise unreferenced, then those things will get garbage
collected along with the thread.
So just delete any reference to it which you have and it
will all get cleaned up.