Hey, I've got a bit of a problem:
vector<BaseClass*> stuffvector;
BaseClass* temp = new DerivedClass(par_a, par_b);
stuffvector.push_back(temp);
delete temp;
This causes the program to crash. I have virtual destructor, so the DerivedClass's destructor should be called just fine. Does it have something to do with the vector? 'Cause I don't really have anything else in mind that could cause the crash. :/
EDIT:
Actually, now that I've opened my eyes, the crash happens when I try to handle the objects contained in the vector.