黃泓量 Jeremy Wong

I obtained the following strings in the output windows when I exited my program. How to read it

Detected memory leaks!
Dumping objects ->
{45} normal block at 0x013C1A60, 16 bytes long.
Data: < qf f - - > E8 71 66 00 0C 91 66 00 F0 2D BD 00 C0 2D BD 00
{44} normal block at 0x013C0040, 16 bytes long.
Data: < qf f / @ > E8 71 66 00 0C 91 66 00 A0 2F BD 00 40 12 BD 00
Object dump complete.



Best regards,
Jeremy


Re: Visual C++ General Detected memory leaks!

Alex Farber

44 and 45 are allocation numbers. Add the following lines to the beginning of the program:

_CrtSetBreakAlloc(44);
_CrtSetBreakAlloc(45);

Run the program under debugger. Debugger breaks on allocation with specified number. This can give you idea what memory is allocated and never released.





Re: Visual C++ General Detected memory leaks!

S Jeremy Wong

Alex,

It didn't break. Could it be a cause by some 3rd party libraries which is not debug build


-Jeremy




Re: Visual C++ General Detected memory leaks!

Alex Farber

I think that if third party library doesn't have debug information, it should break, but statck information is restricted. Is the program in Debug configuration



Re: Visual C++ General Detected memory leaks!


Re: Visual C++ General Detected memory leaks!

S Jeremy Wong

The program is in Debug configuration.