#15 Fixed some of the worst memory leaks

This commit is contained in:
2022-08-22 20:51:09 +01:00
parent b675c4c1bd
commit 08e2adab50
8 changed files with 22 additions and 5 deletions

View File

@@ -531,7 +531,7 @@ void writeCompiler(Compiler* compiler, Node* node) {
void freeCompiler(Compiler* compiler) {
freeLiteralArray(&compiler->literalCache);
FREE(unsigned char, compiler->bytecode);
FREE_ARRAY(unsigned char, compiler->bytecode, compiler->capacity);
compiler->bytecode = NULL;
compiler->capacity = 0;
compiler->count = 0;