mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
free all objects in matrix
This commit is contained in:
@@ -733,8 +733,13 @@ static void freeobj (lua_State *L, GCObject *o) {
|
||||
}
|
||||
|
||||
|
||||
#define sweepwholelist(L,p) sweeplist(L,p,MAX_LUMEM)
|
||||
static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count);
|
||||
static void sweepwholelist (lua_State *L, GCObject **p) {
|
||||
while (*p != NULL) {
|
||||
GCObject *curr = *p;
|
||||
*p = curr->next; /* remove 'curr' from list */
|
||||
freeobj(L, curr); /* erase 'curr' */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user