aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-29 22:01:18 -0400
committeriamcheeseman <[email protected]>2026-05-29 22:01:18 -0400
commit840b5c151fcd207e904fb2a6d3bb3fd658ef6209 (patch)
treed06c90490f087b2c5ad8a95b292ddfa315f5b70f /platform
parenta1429f81e3cfb6cefd44ba412d3d5e8f7bc97a71 (diff)
remove the memory tracker in debug mode for asan
Diffstat (limited to 'platform')
-rw-r--r--platform/desktop/desktop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/desktop/desktop.c b/platform/desktop/desktop.c
index 8de6d8d..56c8dee 100644
--- a/platform/desktop/desktop.c
+++ b/platform/desktop/desktop.c
@@ -186,7 +186,13 @@ void ty_platform_deinit(void)
ty_log_info("deinitializing GLFW...");
glfwDestroyWindow(p.win);
+
+ // If asan is used, it will give a ton of false positives here, but won't
+ // spit out any errors if memory is actually leaked here, so I just leak it
+ // to avoid the errors.
+#ifndef __SANITIZE_ADDRESS__
glfwTerminate();
+#endif
}
void ty_platform_frame(ty_Image img)