aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2023-03-27 17:54:24 +0100
committerdam <dam@gudinoff>2023-03-27 17:54:24 +0100
commite4bae939aea065fa5745e224fc0eb12d5136d1c4 (patch)
tree89106a19cee65e747a86593e14e0324bea5b7599
parentfdb58e513aeddb566c9de9f67d59cf5f25e8ead7 (diff)
downloadtask-time-tracker-e4bae939aea065fa5745e224fc0eb12d5136d1c4.tar.zst
task-time-tracker-e4bae939aea065fa5745e224fc0eb12d5136d1c4.zip
Fixing memory leaks.
-rw-r--r--ttt.jai19
1 files changed, 10 insertions, 9 deletions
diff --git a/ttt.jai b/ttt.jai
index 5848a35..2dac60b 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1213,15 +1213,16 @@ void *mem_alloc(size_t mem_size, const char *error_tag) {
*/
free_memory :: () {
print(">> FREE <<\n");
- /* TODO
- reset_database(&database);
- reset_database(&archive);
- free(string_buffer); string_buffer = NULL;
- free(app_directory); app_directory = NULL;
- free(db_file_path); db_file_path = NULL;
- free(ar_file_path); ar_file_path = NULL;
- */
+ // TODO
+ //reset_database(&database);
+ //reset_database(&archive);
+
+ //free(string_buffer); string_buffer = NULL;
+ free(app_directory);
+ free(db_file_path);
+ free(ar_file_path);
+ //reset_temporary_storage();
}
/*
@@ -1304,7 +1305,7 @@ main :: () {
home_dir = ".";
}
- home_path, success_path := get_absolute_path(home_dir); // Returns temporary memory.
+ home_path, success_path := get_absolute_path(home_dir); // Returns temporary memory. TODO LEAK
if success_path == false {
print_error("Failed to find home directory '%'.", home_dir);
return;