pub fn close(state: LuaState)Expand description
Close the Lua state and free all resources.
C: LUA_API void lua_close(lua_State *L) (pub)
PORT NOTE: In C, lua_close gets the main thread via G(L)->mainthread
and closes that regardless of which thread is passed. In Rust, the caller
should hold the main LuaState and drop it (which triggers close_state
via this function or Drop).
// C: LUA_API void lua_close(lua_State *L) {
// lua_lock(L);
// L = G(L)->mainthread; /* only the main thread can be closed */
// close_state(L);
// }