SeaBreeze
globals.h
Go to the documentation of this file.
1 
33 #ifndef SEABREEZE_GLOBALS_H
34 #define SEABREEZE_GLOBALS_H
35 
36 // change to "#if 1" to enable memory heap debugging under Visual Studio
37 #if 0
38  #ifdef _WINDOWS
39 
40  // For these to work right, you need to #define _CRTDBG_MAP_ALLOC and
41  // _CRTDBG_MAP_ALLOC_NEW in your Visual Studio project (i.e., Project
42  // -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor
43  // Definitions). #Defining them here in your header files DOES NOT
44  // WORK, because Visual Studio will internally include many system
45  // headers (including stdafx.h) long before you get here.
46  //
47  // @see http://msdn.microsoft.com/en-us/library/e5ewb1h3%28v=vs.80%29.aspx
48  // @see http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/ebc7dd7a-f3c6-49f1-8a60-e381052f21b6,
49 
50  #pragma message(" (Windows memory debugging enabled)")
51 
52  // these will provide leak profiling for C malloc(), etc
53  #include <stdlib.h>
54  #include <crtdbg.h>
55 
56  // these will provide leak profiling for C++ 'new'
57  #ifndef DBG_NEW
58  #define DBG_NEW new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
59  #define new DBG_NEW
60  #endif
61 
62  #endif
63 #endif
64 
65 #endif