From 35b6c7341b32372953a8aaa104725db48fd163d6 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 10 Feb 2016 15:22:28 +0100 Subject: [PATCH] Fix a bunch of memory leaks, after enabling file+line-number memory leak tracking for the MS Debug CRT. Few of these were serious, most were on-exit, but good to have a cleaner memory report after running. --- Common/Common.vcxproj | 9 +++++---- Common/Common.vcxproj.filters | 1 + Common/DbgNew.h | 16 ++++++++++++++++ Common/LogManager.cpp | 1 + Core/Core.vcxproj | 6 ++++-- Core/FileSystems/ISOFileSystem.cpp | 7 +++++-- Core/HLE/sceMd5.cpp | 4 ++++ Core/HLE/sceMt19937.cpp | 5 +++++ GPU/GPU.cpp | 6 ++++++ GPU/GPU.vcxproj | 6 ++++-- GPU/GPUCommon.h | 6 ++++++ UI/GameInfoCache.cpp | 7 ++++++- UI/UI.vcxproj | 6 ++++-- Windows/PPSSPP.vcxproj | 8 ++++---- Windows/main.cpp | 3 +-- ext/libarmips.vcxproj | 8 ++++++-- ext/libkirk/libkirk.vcxproj | 5 ++++- ext/native/ext/vjson/block_allocator.cpp | 4 ++-- ext/native/ext/vjson/block_allocator.h | 4 ++-- ext/native/ext/vjson/json.cpp | 2 +- ext/native/native.vcxproj | 6 ++++-- ext/native/thin3d/d3dx9_loader.h | 7 ++++++- ext/native/thin3d/thin3d_d3d9.cpp | 6 ++++++ ext/native/ui/ui_context.cpp | 2 ++ ext/zlib/zlib.vcxproj | 6 ++++-- headless/Headless.vcxproj | 6 ++++-- unittest/UnitTests.vcxproj | 8 +++++--- 27 files changed, 118 insertions(+), 37 deletions(-) create mode 100644 Common/DbgNew.h diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index e281462434..e5c94153c5 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -69,8 +69,8 @@ Use Level3 - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) - stdafx.h + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + stdafx.h;Common/DbgNew.h MultiThreadedDebug ../ext/native;.. StreamingSIMDExtensions2 @@ -96,9 +96,9 @@ Use Level3 - stdafx.h + stdafx.h;Common/DbgNew.h MultiThreadedDebug - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../ext/native;.. NotSet Fast @@ -207,6 +207,7 @@ + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index ffdd697516..7ef3033764 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -58,6 +58,7 @@ GL + diff --git a/Common/DbgNew.h b/Common/DbgNew.h new file mode 100644 index 0000000000..256c68d31d --- /dev/null +++ b/Common/DbgNew.h @@ -0,0 +1,16 @@ +#pragma once + +// Utility file for using the MS CRT's memory tracking. +// crtdbg.h overloads malloc with malloc_dbg etc, but does not catch new. So here we go. + +#include + +#ifdef _DEBUG +#define USE_CRT_DBG +#ifndef DBG_NEW +#define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ ) +#define new DBG_NEW +#endif + + +#endif // _DEBUG \ No newline at end of file diff --git a/Common/LogManager.cpp b/Common/LogManager.cpp index f05f4b3175..373a76040e 100644 --- a/Common/LogManager.cpp +++ b/Common/LogManager.cpp @@ -147,6 +147,7 @@ LogManager::~LogManager() { delete consoleLog_; delete debuggerLog_; #endif + delete ringLog_; } void LogManager::ChangeFileLog(const char *filename) { diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index 041507dcb3..09b1d79cfc 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -70,7 +70,7 @@ Level3 ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86\include;../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib;../ext/native/ext - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) StreamingSIMDExtensions2 Fast true @@ -78,6 +78,7 @@ false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h true @@ -91,7 +92,7 @@ Level3 ..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\include;../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib;../ext/native/ext - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;USE_FFMPEG;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) NotSet Fast false @@ -100,6 +101,7 @@ false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h true diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 2c99ea104e..e69f4fcac2 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -287,10 +287,13 @@ void ISOFileSystem::ReadDirectory(u32 startsector, u32 dirsize, TreeEntry *root, if (!restrictTree.empty()) doRecurse = level < restrictTree.size() && restrictTree[level] == e->name; - if (doRecurse) + if (doRecurse) { ReadDirectory(dir.firstDataSector(), dir.dataLength(), e, level + 1); - else + } else { + // The entry is not kept, must free it. + delete e; continue; + } } } root->children.push_back(e); diff --git a/Core/HLE/sceMd5.cpp b/Core/HLE/sceMd5.cpp index 7df8c50ac4..eb73904035 100644 --- a/Core/HLE/sceMd5.cpp +++ b/Core/HLE/sceMd5.cpp @@ -23,6 +23,10 @@ #include "Common/Crypto/md5.h" #include "Common/Crypto/sha1.h" +#ifdef USE_CRT_DBG +#undef new +#endif + // Not really sure where these belong - is it worth giving them their own file? u32 sceKernelUtilsMt19937Init(u32 ctx, u32 seed) { DEBUG_LOG(HLE, "sceKernelUtilsMt19937Init(%08x, %08x)", ctx, seed); diff --git a/Core/HLE/sceMt19937.cpp b/Core/HLE/sceMt19937.cpp index 62ea11fcb6..a402bb5757 100644 --- a/Core/HLE/sceMt19937.cpp +++ b/Core/HLE/sceMt19937.cpp @@ -21,6 +21,11 @@ #include "Core/MemMap.h" #include "Core/Reporting.h" +#ifdef USE_CRT_DBG +#undef new +#endif + + static u32 sceMt19937Init(u32 mt19937Addr, u32 seed) { WARN_LOG(HLE, "sceMt19937Init(%08x, %08x)", mt19937Addr, seed); diff --git a/GPU/GPU.cpp b/GPU/GPU.cpp index a7d6638a02..6b2a6b8303 100644 --- a/GPU/GPU.cpp +++ b/GPU/GPU.cpp @@ -38,6 +38,9 @@ static void SetGPU(T *obj) { gpuDebug = obj; } +#ifdef USE_CRT_DBG +#undef new +#endif bool GPU_Init(GraphicsContext *ctx) { switch (PSP_CoreParameter().gpuCore) { case GPU_NULL: @@ -58,6 +61,9 @@ bool GPU_Init(GraphicsContext *ctx) { return gpu != NULL; } +#ifdef USE_CRT_DBG +#define new DBG_NEW +#endif void GPU_Shutdown() { delete gpu; diff --git a/GPU/GPU.vcxproj b/GPU/GPU.vcxproj index 6c9d211149..f089cec7f4 100644 --- a/GPU/GPU.vcxproj +++ b/GPU/GPU.vcxproj @@ -85,7 +85,7 @@ Level3 ../common;..;../ext/native;../ext/native/ext/glew; - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_32=1;_M_IX86=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) StreamingSIMDExtensions2 Fast true @@ -93,6 +93,7 @@ false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h true @@ -112,9 +113,10 @@ true false false - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;WIN32;_ARCH_64=1;_M_X64=1;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) MultiThreadedDebug ProgramDatabase + Common/DbgNew.h true diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 690c1a402e..72abc7eefd 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -77,12 +77,18 @@ public: #endif } +#ifdef USE_CRT_DBG +#undef new +#endif void *operator new(size_t s) { return AllocateAlignedMemory(s, 16); } void operator delete(void *p) { FreeAlignedMemory(p); } +#ifdef USE_CRT_DBG +#define new DBG_NEW +#endif bool DescribeCodePtr(const u8 *ptr, std::string &name) override { return false; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 2656f500df..39fec7b098 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -606,7 +606,11 @@ void GameInfoCache::Init() { } void GameInfoCache::Shutdown() { - StopProcessingWorkQueue(gameInfoWQ_); + if (gameInfoWQ_) { + StopProcessingWorkQueue(gameInfoWQ_); + delete gameInfoWQ_; + gameInfoWQ_ = nullptr; + } } void GameInfoCache::Clear() { @@ -643,6 +647,7 @@ void GameInfoCache::Clear() { iter->second->sndFileData.clear(); iter->second->sndDataLoaded = false; } + delete iter->second; } info_.clear(); } diff --git a/UI/UI.vcxproj b/UI/UI.vcxproj index 27c6e27f72..5886b99bfb 100644 --- a/UI/UI.vcxproj +++ b/UI/UI.vcxproj @@ -129,13 +129,14 @@ Level3 - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;_ARCH_32=1;WIN32;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;_ARCH_32=1;WIN32;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib;../ext/native/ext true false false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h Windows @@ -151,7 +152,7 @@ Level3 - USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;_ARCH_64=1;WIN32;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;_CRT_SECURE_NO_WARNINGS;_ARCH_64=1;WIN32;_DEBUG;_LIB;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib;../ext/native/ext true false @@ -159,6 +160,7 @@ MultiThreadedDebug false ProgramDatabase + Common/DbgNew.h Windows diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index 05cade844d..c24357d995 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -119,14 +119,14 @@ - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) false Sync Use Level3 ProgramDatabase ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib - stdafx.h + stdafx.h;Common/DbgNew.h MultiThreadedDebug StreamingSIMDExtensions2 Fast @@ -156,13 +156,13 @@ false - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) Sync Use Level3 ProgramDatabase ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib - stdafx.h + stdafx.h;Common/DbgNew.h MultiThreadedDebug false NotSet diff --git a/Windows/main.cpp b/Windows/main.cpp index 375a8a12ee..b68b3377f0 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -371,9 +371,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin CoInitializeEx(NULL, COINIT_MULTITHREADED); #ifdef _DEBUG - _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); #endif - PROFILE_INIT(); #if defined(_M_X64) && defined(_MSC_VER) && _MSC_VER < 1900 diff --git a/ext/libarmips.vcxproj b/ext/libarmips.vcxproj index b5290b03e5..f4f042f231 100644 --- a/ext/libarmips.vcxproj +++ b/ext/libarmips.vcxproj @@ -132,10 +132,12 @@ Use Level3 - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug armips ProgramDatabase + + Windows @@ -149,11 +151,13 @@ Use Level3 - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) MultiThreadedDebug armips false ProgramDatabase + + Windows diff --git a/ext/libkirk/libkirk.vcxproj b/ext/libkirk/libkirk.vcxproj index 23fb33cec7..661bf7f609 100644 --- a/ext/libkirk/libkirk.vcxproj +++ b/ext/libkirk/libkirk.vcxproj @@ -70,12 +70,13 @@ Level3 Default - _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + _CRTDBG_MAP_ALLOC;_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS true false false MultiThreadedDebug ProgramDatabase + ../../Common/DbgNew.h true @@ -90,6 +91,8 @@ MultiThreadedDebug false ProgramDatabase + ../../Common/DbgNew.h + _CRTDBG_MAP_ALLOC;_USING_V110_SDK71_;%(PreprocessorDefinitions) true diff --git a/ext/native/ext/vjson/block_allocator.cpp b/ext/native/ext/vjson/block_allocator.cpp index f85de3a5ba..f3a573c653 100644 --- a/ext/native/ext/vjson/block_allocator.cpp +++ b/ext/native/ext/vjson/block_allocator.cpp @@ -24,7 +24,7 @@ void block_allocator::swap(block_allocator &rhs) std::swap(m_head, rhs.m_head); } -void *block_allocator::malloc(size_t size) +void *block_allocator::Malloc(size_t size) { if ((m_head && m_head->used + size > m_head->size) || !m_head) { @@ -46,7 +46,7 @@ void *block_allocator::malloc(size_t size) return ptr; } -void block_allocator::free() +void block_allocator::Free() { block_allocator(0).swap(*this); } diff --git a/ext/native/ext/vjson/block_allocator.h b/ext/native/ext/vjson/block_allocator.h index 90a81814f6..9fff7efc50 100644 --- a/ext/native/ext/vjson/block_allocator.h +++ b/ext/native/ext/vjson/block_allocator.h @@ -11,10 +11,10 @@ public: void swap(block_allocator &rhs); // allocate memory - void *malloc(size_t size); + void *Malloc(size_t size); // free all allocated blocks - void free(); + void Free(); private: struct block diff --git a/ext/native/ext/vjson/json.cpp b/ext/native/ext/vjson/json.cpp index 0be8aed2ab..654c37954d 100644 --- a/ext/native/ext/vjson/json.cpp +++ b/ext/native/ext/vjson/json.cpp @@ -268,7 +268,7 @@ char *atof(char *first, char *last, float *out) json_value *json_alloc(block_allocator *allocator) { - json_value *value = (json_value *)allocator->malloc(sizeof(json_value)); + json_value *value = (json_value *)allocator->Malloc(sizeof(json_value)); memset(value, 0, sizeof(json_value)); return value; } diff --git a/ext/native/native.vcxproj b/ext/native/native.vcxproj index 426fb463df..d4527121a9 100644 --- a/ext/native/native.vcxproj +++ b/ext/native/native.vcxproj @@ -79,13 +79,14 @@ Level3 - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ..\..\dx9sdk\Include;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\native\ext\glew;..\SDL\include;..\native\ext;%(AdditionalIncludeDirectories); ProgramDatabase true false false MultiThreadedDebug + ../../Common/DbgNew.h Windows @@ -100,7 +101,7 @@ Level3 - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ..\..\dx9sdk\Include;..\zlib;..\ext\zlib;..\native;..\RollerballGL;..\native\ext\glew;..\SDL\include;..\native\ext;%(AdditionalIncludeDirectories); true false @@ -108,6 +109,7 @@ MultiThreadedDebug false ProgramDatabase + ../../Common/DbgNew.h Windows diff --git a/ext/native/thin3d/d3dx9_loader.h b/ext/native/thin3d/d3dx9_loader.h index a194077a2e..36dad3f96b 100644 --- a/ext/native/thin3d/d3dx9_loader.h +++ b/ext/native/thin3d/d3dx9_loader.h @@ -4,8 +4,13 @@ #pragma once #include +#ifdef USE_CRT_DBG +#undef new +#endif #include - +#ifdef USE_CRT_DBG +#define new DBG_NEW +#endif // Returns the D3DX9 version we got. 0 if none. int LoadD3DX9Dynamic(bool debugVersion = false); // If debugVersion is set, load d3dx9d.dll int GetD3DXVersion(); diff --git a/ext/native/thin3d/thin3d_d3d9.cpp b/ext/native/thin3d/thin3d_d3d9.cpp index 559ac65b51..44f5ab3015 100644 --- a/ext/native/thin3d/thin3d_d3d9.cpp +++ b/ext/native/thin3d/thin3d_d3d9.cpp @@ -7,7 +7,13 @@ #endif #include +#ifdef USE_CRT_DBG +#undef new +#endif #include +#ifdef USE_CRT_DBG +#define new DBG_NEW +#endif #include "base/logging.h" #include "math/lin/matrix4x4.h" diff --git a/ext/native/ui/ui_context.cpp b/ext/native/ui/ui_context.cpp index d5b3bc3972..d2c2d319b6 100644 --- a/ext/native/ui/ui_context.cpp +++ b/ext/native/ui/ui_context.cpp @@ -16,6 +16,8 @@ UIContext::UIContext() UIContext::~UIContext() { delete fontStyle_; delete textDrawer_; + // Not releasing blend_, it's a preset. Should really make them AddRef, though.. + depth_->Release(); } void UIContext::Init(Thin3DContext *thin3d, Thin3DShaderSet *uishader, Thin3DShaderSet *uishadernotex, Thin3DTexture *uitexture, DrawBuffer *uidrawbuffer, DrawBuffer *uidrawbufferTop) { diff --git a/ext/zlib/zlib.vcxproj b/ext/zlib/zlib.vcxproj index c042f189ec..9a194bdff4 100644 --- a/ext/zlib/zlib.vcxproj +++ b/ext/zlib/zlib.vcxproj @@ -102,7 +102,7 @@ Level3 - _CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) StreamingSIMDExtensions2 Fast Default @@ -111,6 +111,7 @@ false false MultiThreadedDebug + ../../Common/DbgNew.h Windows @@ -122,7 +123,7 @@ Level3 - _CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) false NotSet Fast @@ -132,6 +133,7 @@ false MultiThreadedDebug ProgramDatabase + ../../Common/DbgNew.h Windows diff --git a/headless/Headless.vcxproj b/headless/Headless.vcxproj index 55dac84340..0ed50f1a78 100644 --- a/headless/Headless.vcxproj +++ b/headless/Headless.vcxproj @@ -91,7 +91,7 @@ NotUsing Level3 - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS ../Common;..;../Core;../ext/native/ext/glew;../ext/native Default StreamingSIMDExtensions2 @@ -101,6 +101,7 @@ false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h Console @@ -122,7 +123,7 @@ NotUsing Level3 - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_CONSOLE;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../Common;..;../Core;../ext/native/ext/glew;../ext/native NotSet Fast @@ -132,6 +133,7 @@ false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h Console diff --git a/unittest/UnitTests.vcxproj b/unittest/UnitTests.vcxproj index 48327c49f5..9f396c145a 100644 --- a/unittest/UnitTests.vcxproj +++ b/unittest/UnitTests.vcxproj @@ -88,13 +88,14 @@ Level3 - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_32=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib true false false MultiThreadedDebug ProgramDatabase + Common/DbgNew.h Console @@ -109,7 +110,7 @@ Level3 - USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + _CRTDBG_MAP_ALLOC;USING_WIN_UI;GLEW_STATIC;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_ARCH_64=1;_WINDOWS;_UNICODE;UNICODE;%(PreprocessorDefinitions) ../common;..;../ext/native;../ext/native/ext/glew;../ext/zlib true false @@ -117,6 +118,7 @@ MultiThreadedDebug false ProgramDatabase + Common/DbgNew.h Console @@ -217,4 +219,4 @@ - + \ No newline at end of file