1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Add support for Visual Leak Detector, since valgrind doesn't support MSVC

This commit is contained in:
2012-11-18 20:38:55 -08:00
parent 49dfb4e546
commit 9f276e2c57
26 changed files with 146 additions and 10 deletions

View File

@ -81,6 +81,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
# endif
# include <Windows.h>
// This needs to be after #include <windows.h>, since it also includes windows.h
# ifdef USE_VLD
# include <vld.h>
# endif
// Just some fun typedefs...
typedef HWND hsWindowHndl;
typedef HINSTANCE hsWindowInst;

View File

@ -58,6 +58,11 @@ struct WinThreadParam
static unsigned int __stdcall gEntryPointBT(void* param)
{
#ifdef USE_VLD
// Needs to be enabled for each thread except the WinMain
VLDEnable();
#endif
WinThreadParam* wtp = (WinThreadParam*)param;
unsigned int result = wtp->fThread->Run();
::ReleaseSemaphore(wtp->fQuitSemaH, 1, nil); // signal that we've quit