摘要: 先查看系统的内存泄漏报告,如下:
Detected memory leaks!
Dumping objects ->
{1057} normal block at 0x01873BD0, 8 bytes long.
Data: < < > 1C 3C 87 01 F8 CD CD CD
strcore.cpp(118) : {1056} normal block at 0x01873C10, 45 bytes long.
Data: < 31 > 01 00 00 00 02 00 00 00 20 00 00 00 33 31 00 CD
.....
然后在程序主程序的初始化中加入下列语句:
_CrtSetBreakAlloc(1057);
在中断时进行查找即可。
阅读全文