aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai15
1 files changed, 13 insertions, 2 deletions
diff --git a/ttt.jai b/ttt.jai
index f3f1905..0715544 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -17,7 +17,12 @@
// - release : jai ttt.jai -quiet -x64 -release
// - debug : jai ttt.jai -quiet -x64
+DEBUG_MEMORY :: true;
+#if DEBUG_MEMORY {
#import "Basic"()(MEMORY_DEBUGGER=true); // TODO Remove after final debug sessions. This takes up ~30MB of RAM.
+} else {
+#import "Basic";
+}
#import "System";
#import "Sort";
#import "Math";
@@ -1157,8 +1162,10 @@ prompt_user_key :: (y: int, message: string) -> TUI.Key {
}
main :: () {
-
+
+#if DEBUG_MEMORY {
defer report_memory_leaks(); // TODO Remove after final debug sessions.
+}
defer free_memory();
@@ -1774,7 +1781,11 @@ main :: () {
}
assert(TUI.reset_terminal(), "Failed to reset TUI.");
-
+
+#if DEBUG_MEMORY {
+ return;
+} else {
exit(xx ifx error_saving then 1 else 0);
}
+}