memory leaks - problem with MFC Diagnostics -


So I implemented my memory tracking (in this question) and to identify my memory leaks, Tried to use So I really have been described here:

This is my code:

  #ifdef _DEBUG CMemoryState oldMemState, newMemState, diffMemState; OldMemState.Checkpoint (); #endif int * test = new int; #ifdef _DEBUG newMemState.Checkpoint (); If (DiffMemStatekDifference (Puranammstet, Nyammstet)) (Tracey ( "memory leaks! \ N"); diffMemState.DumpStatistics (); diffMemState.DumpAllObjectsSince ();} #endif  

But Displaying output, instead of outputting any useful information

 <0> memory leak! 0 blocks by 0 free blocks. 1 in 4 blocks in normal blocks 0 bytes 0 CRT blocks 0 blocks in 0 blocks Ignore 0 0 bytes in the client blocks The largest number of use: 0 bytes Total allocation: 4 bytes Dumping objects - & gt; {714538} normal block 0x029628 C8, 4 bytes long data: & lt; & Gt; CD CD: \ dd \ vctools \ vc7libs \ ship \ atlmfc \ src \ mfc \ thrdcore.cpp (306 ): {714536} on the client block 0x022F6040, subtype C0, 68 bytes a CWinThread object tall. $ 022F6040, 68 bytes long {714535} 0x03B607A8 normal block, 4 bytes long. data: & lt; @ `/ & gt; 40 60 2 F 02 {714534} normal block 0x03B58C70, 8 bytes long data: & lt; N & gt; F0 4E B5 03 00 00 00 00 {714533} client block 0x03B54EF0, subtype C0, length 12 bytes. A seawant object at $ 03B54EF0, 12 bytes long {714524} 0x022 FFFC 8 normal block, 1 bytes long. Data: & lt; & Gt; Normal block on CD {714523} 0x03B608C0, 12 bytes long Data: & lt; XH & gt; Common blocks, 12 bytes long on E8 07 B6 03 78 08 B6 03 68 97 9 A 02 (714522) 0x03b 60878 Data: & lt; 0 P & gt; The normal block, 12 bytes long data in C 0 08B 6 03 30 08B 6 03 50 82 9 A 02 (714521) 0x03b 60830: & lt; X & gt; 78 8 B 6 03 E8 07 B6 03 88 81 9 A 02 (714520) 0x03 B 607E 8 Common block, 12 bytes long. Data: & lt; 0 & gt; 30 08 b 6 03 c 08 b 6 03 cd cd cd cd (714515) 0x03 b 606 b 0 normal block, 104 bytes long data: & lt; & Gt; 00 00 00 CD CD CD CD CD CD CD CD CD CD CD (714510) 0x03 B 60668 Normal block, 12 bytes long. Data: & lt; & Gt; General block, 12 bytes long data in C8 03 B6 03 20 06 B6 03 88 AC 9 A 02 (71450 9) 0x03b 60620: & lt; H h & gt; 68 06 b 6 03 d8 05 b 6 03 68 97 9 a 02  

......... and it is going and going and the number of brackets down (

It is always starting with this high number 714538 - What am I doing wrong?

Thank you!

shows it should be called on CMemoryState object Dnpolobjekts (s) you checkpoint () call.

so Your code should be:

  {TRACE ("Memory leak! \ N"); diffMemState.DumpStatist Ics (); //diffMemState.DumpAllObjectsSince (); oldMemState.DumpAllObjectsSince ();}  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -