Garbage collection now much better, not good

There's clearly still a lot of things getting incremented but not decremented.
This commit is contained in:
Simon Brooke 2018-12-29 09:35:29 +00:00
parent ad806de656
commit 7b126ea979
7 changed files with 39 additions and 6 deletions

View file

@ -112,9 +112,17 @@ repl( FILE * in_stream, FILE * out_stream, FILE * error_stream,
}
break;
} else {
repl_print( output_stream, repl_eval( input ) );
struct cons_pointer val = repl_eval( input );
inc_ref(val);
repl_print( output_stream, val );
dec_ref(val);
}
dec_ref( input );
}
dec_ref(input_stream);
dec_ref(output_stream);
debug_print( L"Leaving repl\n", DEBUG_REPL );
}