示例#1
0
void CMLeakView::OnDraw(CDC* pDC)
{

    CMLeakDoc* pDoc = GetDocument();
    ASSERT_VALID(pDoc);

    CFont* pOFont;

    pOFont = pDC->SelectObject(&NFont);

    pDC->TextOut(20, 200, pDoc->myCString);

    pDC->SelectObject(pOFont);
    DeleteObject(pOFont);

#ifdef _DEBUG
    newMemState.Checkpoint();
    if (diffMemState.Difference(oldMemState,newMemState))
    {
        TRACE("\n\nDifference between start and finish!");
        newMemState.DumpStatistics();
    }
#endif

}
示例#2
0
文件: wed.cpp 项目: akavel/wed-editor
void 	CWedApp::OnAppAbout()
{
	CAboutDlg aboutDlg;

// Declare the variables needed
#ifdef _DEBUG
    static CMemoryState oldMemState3, newMemState3, diffMemState3;
#endif


#ifdef _DEBUG
    oldMemState3.Checkpoint();
#endif

	aboutDlg.DoModal();

#ifdef _DEBUG
    newMemState3.Checkpoint();
    if( diffMemState3.Difference( oldMemState3, newMemState3 ) )
    {
		oldMemState3.DumpAllObjectsSince();
		//P2N("CDialog Memory leaked!\r\n");
        //TRACE( "CDialog Memory leaked!\n" );
    }
#endif

}
示例#3
0
CMainFrame::~CMainFrame()
{
#ifdef _DEBUG
    newMemState.Checkpoint();
    if( diffMemState.Difference( oldMemState, newMemState ) )
        {
        //P2N("Mainfrm Memory leaked!\r\n");
        //TRACE("Mainframe Diff dump\n");
        //diffMemState.DumpAllObjectsSince();
        //TRACE( "Memory leaked!\n" );
        }
#endif
}
示例#4
0
CWedDoc::~CWedDoc()

{

#ifdef _DEBUG
	//oldMemState.DumpAllObjectsSince();
    //newMemState.Checkpoint();
    if( diffMemState.Difference( oldMemState, newMemState ) )
    	{
		//P2N("WedDoc Memory leaked!\r\n");
        //TRACE( "Memory leaked!\n" );
    	}
#endif
}