使用已被释放的指针
C++-Undefined-Behavior-17
示例:
int* p = new int(1);
delete p; // Well-defined
delete p; // Undefined behavior
cout << *p; // Undefined behavior
指针指向的对象被回收后,指针的值和指针曾指向的对象均失效,继续访问会导致未定义的行为。
依据
ISO/IEC 14882:2003 3.7.3.2(4)-undefined
ISO/IEC 14882:2011 3.7.4.2(4)-undefined