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

Function luaC_freeallobjects

third-party/lua-5.2.4/src/lgc.c:983–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981
982
983void luaC_freeallobjects (lua_State *L) {
984 global_State *g = G(L);
985 int i;
986 separatetobefnz(L, 1); /* separate all objects with finalizers */
987 lua_assert(g->finobj == NULL);
988 callallpendingfinalizers(L, 0);
989 g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */
990 g->gckind = KGC_NORMAL;
991 sweepwholelist(L, &g->finobj); /* finalizers can create objs. in 'finobj' */
992 sweepwholelist(L, &g->allgc);
993 for (i = 0; i < g->strt.size; i++) /* free all string lists */
994 sweepwholelist(L, &g->strt.hash[i]);
995 lua_assert(g->strt.nuse == 0);
996}
997
998
999static l_mem atomic (lua_State *L) {

Callers 1

close_stateFunction · 0.70

Calls 2

separatetobefnzFunction · 0.70
callallpendingfinalizersFunction · 0.70

Tested by

no test coverage detected