ReplicaNet and RNLobby  1
MemoryTracking.h
1 // Memory tracking APIs have been deprecated.
2 // This file is still the first header file included by all ReplicaNet code to allow custom memory hooks (new/delete/malloc/free/etc) to be easily added to builds.
3 
4 // Supported by most modern compilers
5 #pragma once
6 
7 // Parse preprocessor platform defines
8 #include "RNPlatform/Inc/PlatformConfig.h"
9 
10 #ifdef _WIN32
11 #ifdef _CRTDBG_MAP_ALLOC
12 
13 #include <stdlib.h>
14 #include <crtdbg.h>
15 
16 #ifndef RNPLATFORM_DO_NOT_DEFINE_DEBUG_NEW
17 #ifndef DEBUG_NEW
18 #define DEBUG_NEW new(_NORMAL_BLOCK , __FILE__ , __LINE__)
19 #define new DEBUG_NEW
20 #endif //< ifndef DEBUG_NEW
21 #endif //< ifndef RN_DO_NOT_DEFINE_DEBUG_NEW
22 
23 #endif //< ifdef _CRTDBG_MAP_ALLOC
24 #endif //< ifdef _WIN32