1
0
cuberite-2a/source/MemoryLeak.h
cedeel@gmail.com 92c59963f8 Attempt to bring sanity to newlines across systems.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14 13:06:06 +00:00

20 lines
443 B
C

#pragma once
#ifdef _WIN32
#ifdef _DEBUG
// Enable the CRT debugging features:
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
// This works only in MSVC 2010+:
#if _MSC_VER >= 1600
// Map the new operator
#ifndef DEBUG_NEW
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif // _CRTDBG_MAP_ALLOC
#endif // _MSC_VER
#endif // _DEBUG
#endif // _WIN32