From 7b62b81ebd731a03db919f1df24aee4d37bb2c1d Mon Sep 17 00:00:00 2001 From: hikari Date: Wed, 7 Jun 2023 20:03:19 +0300 Subject: [PATCH] [core:thread] Fix compilation --- core/thread/thread_unix.odin | 2 ++ core/thread/thread_windows.odin | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/thread/thread_unix.odin b/core/thread/thread_unix.odin index eac971dd7..64f2816e0 100644 --- a/core/thread/thread_unix.odin +++ b/core/thread/thread_unix.odin @@ -69,6 +69,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { if t.self_cleanup { t.unix_thread = {} + // NOTE(ftphikari): It doesn't matter which context 'free' received, right? + context = {} free(t, t.creation_allocator) } diff --git a/core/thread/thread_windows.odin b/core/thread/thread_windows.odin index eace9a926..7a7c8b4a2 100644 --- a/core/thread/thread_windows.odin +++ b/core/thread/thread_windows.odin @@ -50,6 +50,8 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread { if t.self_cleanup { win32.CloseHandle(t.win32_thread) t.win32_thread = win32.INVALID_HANDLE + // NOTE(ftphikari): It doesn't matter which context 'free' received, right? + context = {} free(t, t.creation_allocator) }