C++에서 코드를 작성하다 보면, 동적 할당 된 메모리 관리에 대해 잘하고 있는지 의문이 들 때가 있다. 그럴 때에 사용하면 유용한 Windows 내장 함수를 알아보자. int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { // 메모리 누수(Lead) 체크 _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); //_crtBreakAlloc(); // Memory Leak 유발 코드 한 줄 int* iTestValue = new int(); ... } Windows App의 mai..