解决 after Normal block(#908) at 0x399EC0. CRT detected that the application wrote to memory after end of heap buffer 内存出错 1. 数组越界所导致 char* pBuffer = new char[2]; int v = 123; strcpy(pBuffer, &v); delete[] pBuffer; 2. 释放过的内存没有置为0,也就是就是野指针的问题 if (this-&g
我们知道,MFC程序如果检测到存在内存泄漏,退出程序的时候会在调试窗口提醒内存泄漏.例如: class CMyApp : public CWinApp{public:BOOL InitApplication(){int* leak = new int[10];return TRUE;}};产生的内存泄漏报告大体如下: Detected memory leaks!Dumping objects ->c:worktest.cpp(186) : {52} normal block at 0x003C4
当finall块中包含return语句时,Eclipse会给出警告“finally block does not complete normally”,原因分析如下: 1.不管try块.catch块中是否有return语句,finally块都会执行.2.finally块中的return语句会覆盖前面的return语句(try块.catch块中的return语句),所以如果finally块中有return语句,Eclipse编译器会报警告“finally block does not comple