MCPcopy Create free account
hub / github.com/F-Stack/f-stack / close_state

Function close_state

freebsd/contrib/openzfs/module/lua/lstate.c:221–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220
221static void close_state (lua_State *L) {
222 global_State *g = G(L);
223 luaF_close(L, L->stack); /* close all upvalues for this thread */
224 luaC_freeallobjects(L); /* collect all objects */
225 if (g->version) /* closing a fully built state? */
226 luai_userstateclose(L);
227 luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size);
228 luaZ_freebuffer(L, &g->buff);
229 freestack(L);
230 lua_assert(gettotalbytes(g) == sizeof(LG));
231 (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0); /* free main block */
232}
233
234
235LUA_API lua_State *lua_newthread (lua_State *L) {

Callers 2

lua_newstateFunction · 0.70
lua_closeFunction · 0.70

Calls 3

luaC_freeallobjectsFunction · 0.85
luaF_closeFunction · 0.70
freestackFunction · 0.70

Tested by

no test coverage detected