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

Function luaC_freeallobjects

third-party/lua-5.3.5/src/lgc.c:967–979  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965
966
967void luaC_freeallobjects (lua_State *L) {
968 global_State *g = G(L);
969 separatetobefnz(g, 1); /* separate all objects with finalizers */
970 lua_assert(g->finobj == NULL);
971 callallpendingfinalizers(L);
972 lua_assert(g->tobefnz == NULL);
973 g->currentwhite = WHITEBITS; /* this "white" makes all objects look dead */
974 g->gckind = KGC_NORMAL;
975 sweepwholelist(L, &g->finobj);
976 sweepwholelist(L, &g->allgc);
977 sweepwholelist(L, &g->fixedgc); /* collect fixed objects */
978 lua_assert(g->strt.nuse == 0);
979}
980
981
982static 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