From 840b5c151fcd207e904fb2a6d3bb3fd658ef6209 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Fri, 29 May 2026 22:01:18 -0400 Subject: remove the memory tracker in debug mode for asan --- platform/desktop/desktop.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'platform/desktop/desktop.c') 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) -- cgit v1.3-2-g0d8e