scalar deleting destructor issue
问题 I can't figure out why I get error for the code below. The instances of object A will be pushed into a vector ( vectorA.push_back(A a) ) continuously. So sometimes, vectorA needs to be reallocated; the destructor will be called, which is where the destructor of A gets called, then the error message appears. class A { long filePos; union { Recording* recording; UINT64 timeStamp; }; public: inline A(long fpos, UINT64 ts) : filePos(fpos), timeStamp(ts) {} ~A() { if (getDetailedType() ==