+ Reply to Thread
Results 1 to 2 of 2

Thread: How to find memory leak in MFC?

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    48

    How to find memory leak in MFC?

    How to find memory leak in MFC?

  2. #2
    You can use below example as a reference:

    Code:
    void FindMemoryLeak()
    {
       CMemoryState checkPoint1 ;
    
       checkPoint1.Checkpoint() ;
       
       char *pLong = new char[1000000L] ;
       
       CMemoryState checkPoint2 ;
    
       checkPoint2.Checkpoint() ;
       
       CMemoryState checkPoint3 ;
       BOOL bDifferenceFound = checkPoint3.Difference(checkPoint1, checkPoint2) ;
    }
    Note:
    http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts