다음을 통해 공유


AfxEnableMemoryLeakDump

Enables and disables the memory leak dump in the AFX_DEBUG_STATE destructor.

BOOL AFXAPI AfxEnableMemoryLeakDump(
   BOOL bDump
);

매개 변수

  • [in] bDump
    TRUE indicates the memory leak dump is enabled; FALSE indicates the memory leak dump is disabled.

반환 값

The previous value for this flag.

설명

When an application unloads the MFC library, the MFC library checks for memory leaks. At this point, any memory leaks are reported to the user through the Debug window of Visual Studio.

If your application loads another library before the MFC library, some memory allocations in that library will be incorrectly reported as memory leaks. False memory leaks can cause your application to close slowly as the MFC library reports them. In this case, use AfxEnableMemoryLeakDump to disable the memory leak dump.

참고

If you use this method to turn off the memory leak dump, you will not receive reports of valid memory leaks in your application.You should only use this method if you are confident that the memory leak report contains false memory leaks.

요구 사항

Header: afx.h

참고 항목

참조

매크로, 전역 함수 및 전역 변수