标签: c++
可能重复: How to check deallocation of memory
如果我有这种形状:
class X { int* first_; int* current_; int* last_; X():last_(current_ = first_ = nullptr) {/*e.b.*/} ~X() { delete first_; } };
如何检查first_分配和指向的内存是否已在X的析构函数中正确释放?