I have a vector (pflist) of "Pictureframe"s, and I want to destroy all of them. So I run pflist.clear(); The documentation says that this runs the destructor of each item in the vector, but it isn't!
I have a:
vector<Pictureframe*> pflist;
And here's the rest:
class Pictureframe{
scene::IMeshSceneNode *picture;
scene::IMeshSceneNode *frame;
public:
Pictureframe();
~Pictureframe();
};
and then in the cpp file:
Pictureframe::~Pictureframe(){
// delete picture;
// delete frame;
cout<<"Destructor Called.\n\n";
}
There is nary a "Destructor Called" in sight! Here's where I call it:
pflist.clear();
I am sure that this line is being run, and that is populated by 5 pictureframes. I also tried a for loop that went through the vector pop_back'ing, and that had the same problem.
So Destructor, Y U NO CALL?