| 965 | |
| 966 | |
| 967 | void 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 | |
| 982 | static l_mem atomic (lua_State *L) { |
no test coverage detected