00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __MEMORY_H__
00012 #define __MEMORY_H__
00013
00014 #include "Common/CommonDll.h"
00015 #include <windows.h>
00016 #include <crtdbg.h>
00017
00018 #if _DEBUG_MEM
00019
00020 extern void* operator new( unsigned int Size );
00021 extern void operator delete( void* pPointer );
00022
00023
00024
00025 #endif _DEBUG_MEM
00026
00027
00028 class COMMON_API KMemory
00029 {
00030 public:
00031 ~KMemory()
00032 {
00033 if( !_CrtDumpMemoryLeaks() )
00034 OutputDebugString( "No memory leak !!!\n" );
00035 }
00036 };
00037
00038 #endif __MEMORY_H__