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

@ -20,5 +20,9 @@ set(plClientPatcher_SOURCES
add_library(plClientPatcher STATIC ${plClientPatcher_HEADERS} ${plClientPatcher_SOURCES})
target_link_libraries(plClientPatcher CoreLib plAudioCore plStatusLog)
if(USE_VLD)
target_link_libraries(plClientPatcher ${VLD_LIBRARY})
endif()
source_group("Header Files" FILES ${plClientPatcher_HEADERS})
source_group("Source Files" FILES ${plClientPatcher_SOURCES})

View File

@ -264,6 +264,10 @@ static void NetErrorHandler (ENetProtocol protocol, ENetError error) {
/*
//============================================================================
static void WaitUruExitProc (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
plLauncherInfo *info = (plLauncherInfo *) param;
WaitForSingleObject(s_pi.hProcess, INFINITE);
DWORD exitcode;
@ -539,6 +543,10 @@ static void ProcessManifestEntry (void * param, ENetError error) {
//============================================================================
static void ProcessManifest (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
wchar_t basePath[MAX_PATH];
char path[MAX_PATH];
AtomicAdd(&s_perf[kPerfThreadTaskCount], 1);
@ -885,6 +893,10 @@ void ShutdownAsyncCore () {
//============================================================================
// param = URU_PreparationRequest
void UruPrepProc (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
s_running = true;
plLauncherInfo *info = (plLauncherInfo *) param;
@ -952,6 +964,10 @@ void UruPrepProc (void * param) {
//============================================================================
void PlayerStopProc (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
s_running = false;
plLauncherInfo *info = (plLauncherInfo *) param;
//TerminateProcess(s_pi.hProcess, kExitCodeTerminated);
@ -960,6 +976,10 @@ void PlayerStopProc (void * param) {
//============================================================================
void PlayerTerminateProc (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
s_running = false;
plLauncherInfo *info = (plLauncherInfo *) param;
ShutdownAsyncCore();
@ -968,6 +988,10 @@ void PlayerTerminateProc (void * param) {
//============================================================================
void UruStartProc (void * param) {
#ifdef USE_VLD
VLDEnable();
#endif
if(!s_running)
return;