diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -116,9 +116,12 @@ int main(void) } if (state.thread_alive) - pthread_cancel(step_thread); + { + state.thread_alive = false; + pthread_join(step_thread, NULL); + } - write_to_file(&state, "data.out"); CloseWindow(); + free(state.data); return 0; } |