mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-06 10:10:17 +00:00
Update objectpool.c
This commit is contained in:
parent
b74d336e53
commit
011b03b65a
@ -107,8 +107,8 @@ static int Pool__sweep_dealloc(Pool* self,
|
||||
if(item->unused_length == item->block_count) {
|
||||
// all free
|
||||
if(arenas->length > 0) {
|
||||
// at least one arena
|
||||
PoolArena__delete(item);
|
||||
// keep at least 1 arena
|
||||
PK_FREE(item);
|
||||
} else {
|
||||
// no arena
|
||||
c11_vector__push(PoolArena*, arenas, item);
|
||||
@ -127,7 +127,7 @@ static int Pool__sweep_dealloc(Pool* self,
|
||||
} else {
|
||||
if(item->unused_length == item->block_count) {
|
||||
// all free
|
||||
PoolArena__delete(item);
|
||||
PK_FREE(item);
|
||||
} else {
|
||||
// some free
|
||||
c11_vector__push(PoolArena*, arenas, item);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user