이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

AfxEnableMemoryTracking

Diagnostic memory tracking is normally enabled in the Debug version of MFC.

BOOL AfxEnableMemoryTracking(
   BOOL bTrack 
); 
bTrack

Setting this value to TRUE turns on memory tracking; FALSE turns it off.

The previous setting of the tracking-enable flag.

Use this function to disable tracking on sections of your code that you know are allocating blocks correctly.

For more information on AfxEnableMemoryTracking, see Debugging MFC Applications.

Note Note

This function works only in the Debug version of MFC.


BOOL CMyWinApp::InitInstance()
{
#ifdef _DEBUG
   // Disable tracking of memory for the scope of the InitInstance()
   AfxEnableMemoryTracking(FALSE);
#endif  // _DEBUG

   // ...

#ifdef _DEBUG
   // Re-enable tracking of memory
   AfxEnableMemoryTracking(TRUE);
#endif  // _DEBUG

   return TRUE;
}


Header: afx.h

이 정보가 도움이 되었습니까?
(1500자 남음)
커뮤니티 콘텐츠 추가