project64/Source/Common/MemTest.h

17 lines
470 B
C
Raw Permalink Normal View History

2022-10-03 08:04:42 +00:00
#pragma once
#if (defined(_MSC_VER) && _DEBUG)
#define MEM_LEAK_TEST
#endif
#ifdef MEM_LEAK_TEST
2022-10-03 08:04:42 +00:00
void * operator new(size_t size, const char * filename, unsigned int line);
void * operator new[](size_t size, const char * filename, unsigned int line);
void operator delete(void * ptr, const char * filename, unsigned int line);
void operator delete[](void * ptr, const char * filename, unsigned int line);
2022-10-03 08:04:42 +00:00
#define new new (__FILE__, __LINE__)
2015-01-31 19:27:27 +00:00
#endif