Skip to content

Commit

Permalink
Fixed handle leak
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Jul 21, 2024
1 parent 37bf855 commit 8894da4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/memory_leak_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ static DWORD WINAPI minidump_and_crash_thread(LPVOID param)

void minidump_and_crash(size_t delay)
{
CreateThread(nullptr, 0, minidump_and_crash_thread, reinterpret_cast<LPVOID>(delay), 0, nullptr);
HANDLE h = CreateThread(nullptr, 0, minidump_and_crash_thread, reinterpret_cast<LPVOID>(delay), 0, nullptr);
CloseHandle(h);
}

FORCEINLINE static void add_alocation(void* p, size_t size)
Expand Down

0 comments on commit 8894da4

Please sign in to comment.