I have a class that creates a vector of objects. In the deconstructor for this class I\'m trying to deallocate the memory assigned to the objects. I\'m trying to do this by
for(std::vector::iterator beg = myVector->begin(), end = myVector->end(); beg != end; beg++) { delete *beg; } myVector->clear();