[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Exit one Lua state from a (C) API function
- From: Oliver Kroth <oliver.kroth@...>
- Date: Fri, 5 Mar 2021 16:07:48 +0100
Depending on what you do next with the Lua state, you may not have to
terminate each separate thread.
If you want to close the Lua state (calling lua_close), the garbage
collector will collect and free ALL memory that has been allocated in
this Lua state.
Oliver
Am 05.03.21 um 13:39 schrieb bel:
The "my_exit" function needs to call lua_sethook not only for the main
state and the thread-state calling "my_exit", but for all thread
states owned by the main lua_state.