MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / close_state

Function close_state

third-party/lua-5.3.5/src/lstate.c:242–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242static void close_state (lua_State *L) {
243 global_State *g = G(L);
244 luaF_close(L, L->stack); /* close all upvalues for this thread */
245 luaC_freeallobjects(L); /* collect all objects */
246 if (g->version) /* closing a fully built state? */
247 luai_userstateclose(L);
248 luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size);
249 freestack(L);
250 lua_assert(gettotalbytes(g) == sizeof(LG));
251 (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0); /* free main block */
252}
253
254
255LUA_API lua_State *lua_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.70
lua_closeFunction · 0.70

Calls 3

luaF_closeFunction · 0.70
luaC_freeallobjectsFunction · 0.70
freestackFunction · 0.70

Tested by

no test coverage detected