Commit Graph
3 Commits
Author SHA1 Message Date
André Althaus f6014d41e8 fix: free previously allocated rootDirectory before reassignment and clear on VM teardown
Add missing free of the old rootDirectory pointer in setRootDirectory to prevent
memory leaks when the function is called multiple times. Also set rootDirectory
to NULL via setRootDirectory after VM teardown in runFile to ensure the pointer
is properly cleared before program exit.
2015-06-03 19:48:26 +00:00
André Althaus 7fa4676cc4 fix: clear compiler constants buffer in freeCompiler and endCompiler to prevent memory leak
The constants buffer was not being cleared when the compiler finished,
causing a memory leak since ownership of constants is transferred to
the new function via wrenNewFunction. Added wrenValueBufferClear calls
in both freeCompiler and endCompiler to properly release the buffer.
2015-06-03 19:47:16 +00:00
André Althaus 8c9e3c794e fix: replace realloc with custom defaultReallocate to handle zero-size case correctly 2015-06-02 18:57:41 +00:00