흔한거
메모리가 줄줄줄 #include <crtdbg.h> #if !defined(__AFX_H__) || defined(_AFX_NO_DEBUG_CRT) static class CDebugMemoryLeak{ public: CDebugMemoryLeak() { _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); } } __CDebugMemoryLeak; #endif #define _DEBUG_NEW new(__FILE__, __LINE__) #define new _DEBUG_NEW |
대부분 디버깅용으로 __FILE__ __LINE__ 파라미터 받아들이는 버전이 어지간하면 다 있더라