fixed windows api and free GetThreadName's allocation

This commit is contained in:
PePerRoNii
2025-08-20 21:51:56 +07:00
parent 8884ad01f5
commit 5ab3c1794e

View File

@@ -169,6 +169,7 @@ _get_name :: proc(thread: ^Thread, allocator: runtime.Allocator, loc: runtime.So
buf_16: win32.PWSTR
win32.GetThreadDescription(t_handle, &buf_16)
name = win32.wstring_to_utf8(buf_16, -1, allocator) or_return
win32.LocalFree(rawptr(buf_16))
return
}