From 6c3d44449032e386c2b4163c3635f1fe6934e5d7 Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 10 Feb 2012 14:02:09 -0800 Subject: EXP-1889 FIX As a Second Life viewer developer, I would like a tool that helps me find memory leaks. --- indra/newview/llappviewerwin32.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llappviewerwin32.cpp') diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 6931b55c4c..bad60a9757 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -26,6 +26,10 @@ #include "llviewerprecompiledheaders.h" +#ifdef INCLUDE_VLD +#include "vld.h" +#endif + #include "llappviewerwin32.h" #include "llmemtype.h" @@ -105,6 +109,14 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, LPSTR lpCmdLine, int nCmdShow) { +#ifdef INCLUDE_VLD + // only works for debug builds (hard coded into vld.h) + #ifdef _DEBUG + // start with Visual Leak Detector turned off + VLDGlobalDisable(); + #endif // _DEBUG +#endif // INCLUDE_VLD + LLMemType mt1(LLMemType::MTYPE_STARTUP); const S32 MAX_HEAPS = 255; -- cgit v1.2.3