Original Post
So I noticed that when I add objects to a vector, their destructors are being called more than they should be... see the following...
class foo {
public:
foo() { assert(!"foo constructor"); }
~foo() { assert(!"foo destructor"); }
};
...
std::vector<foo> fooVec;
fooVec.push_back(foo());
The above code generates one cunstructor assert, followed by THREE destructors! Zuh?