memory leak be gone
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <ffi.h>
|
||||
|
||||
#define HEAP_GET(heap, idx) (&(heap)->heap[(idx)])
|
||||
#define HEAP_SET(heap, idx, val) ((heap)->heap[(idx)] = (val))
|
||||
#define HEAP_SET(heap, idx, val) ({Ground.Free.BytecodeValue(&(heap)->heap[idx]); ((heap)->heap[(idx)] = (val));})
|
||||
|
||||
#define CONTINUE (struct GroundExecutionResult) { _GER_CONTINUE }
|
||||
#define JUMP(idx) (struct GroundExecutionResult) { .type = _GER_JUMP, .as.line = idx }
|
||||
@@ -89,7 +89,6 @@ struct GroundExecutionResult _GroundBytecodeInstructionExecute(GroundBytecodeIns
|
||||
SET: {
|
||||
if (instruction->args.at[0] != instruction->args.at[1]) {
|
||||
GroundBytecodeValue copy = Ground.Copy.BytecodeValue(HEAP_GET(heap, instruction->args.at[1]));
|
||||
Ground.Free.BytecodeValue(&heap->heap[instruction->args.at[0]]);
|
||||
HEAP_SET(heap, instruction->args.at[0], copy);
|
||||
}
|
||||
return CONTINUE;
|
||||
|
||||
Reference in New Issue
Block a user