OSDN Git Service

Vss2Git
[peercast-im/PeerCastIM.git] / c: / Git / PeerCast.root / PeerCast / ui / win32 / Simple_vp / chkMemoryLeak.h
1 #ifndef _CHKMEMORYLEAK_H
2 #define _CHKMEMORYLEAK_H
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7
8 #ifdef _DEBUG
9   #define _CRTDBG_MAP_ALLOC
10
11   #define  SET_CRT_DEBUG_FIELD(a)   _CrtSetDbgFlag((a) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
12   #define  CLEAR_CRT_DEBUG_FIELD(a) _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
13
14   void*  operator new(size_t size, const char *filename, int linenumber);
15   void   operator delete(void * _P, const char *filename, int linenumber);
16 #else
17   #define  SET_CRT_DEBUG_FIELD(a)   ((void) 0)
18   #define  CLEAR_CRT_DEBUG_FIELD(a) ((void) 0)
19 #endif
20
21 #include <malloc.h>
22 #include <crtdbg.h>
23
24 #endif