内存泄露 int *pVal = new int; *pVal = 89; pVal = new int; *pVal = 99; 整型89所对应的区域被分配到了堆中,但是还没有释放,就将指针指向99所在的内存区域,这样无法去释放89所对应的内存释放,这也是内存泄露的原因之一。