MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / close_state

Function close_state

deps/lua/src/lstate.c:105–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104
105static void close_state (lua_State *L) {
106 global_State *g = G(L);
107 luaF_close(L, L->stack); /* close all upvalues for this thread */
108 luaC_freeall(L); /* collect all objects */
109 lua_assert(g->rootgc == obj2gco(L));
110 lua_assert(g->strt.nuse == 0);
111 luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size, TString *);
112 luaZ_freebuffer(L, &g->buff);
113 freestack(L, L);
114 lua_assert(g->totalbytes == sizeof(LG));
115 (*g->frealloc)(g->ud, fromstate(L), state_size(LG), 0);
116}
117
118
119lua_State *luaE_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.85
lua_closeFunction · 0.85

Calls 3

luaF_closeFunction · 0.85
luaC_freeallFunction · 0.85
freestackFunction · 0.85

Tested by

no test coverage detected