REVIEW: Memory Leak - NASAL

2,048,000 bytes in 1 blocks are still reachable.
naFree(globals->deadBlocks) is required during shutdown.
This commit is contained in:
Scott Giese 2020-08-17 19:03:20 -05:00
parent 08bbe08205
commit 5fdcd72de9

View File

@ -173,6 +173,8 @@ static void initGlobals()
naGC_init(&(globals->pools[i]), i); naGC_init(&(globals->pools[i]), i);
globals->deadsz = BASE_SIZE; globals->deadsz = BASE_SIZE;
globals->ndead = 0; globals->ndead = 0;
// REVIEW: Memory Leak - 2,048,000 bytes in 1 blocks are still reachable
// naFree(globals->deadBlocks) is required during shutdown
globals->deadBlocks = naAlloc(sizeof(void*) * globals->deadsz); globals->deadBlocks = naAlloc(sizeof(void*) * globals->deadsz);
// Initialize a single context // Initialize a single context