What I want to do is loop through all elements inside the MAP container and then delete it.
Lastly, just invoke clear() on the map to remove all elements.
Is my code correct?
Code:MyMap::iterator it; for (it = MyMap.begin(); it != MyMap.end(); ++it) { delete (*it).second; } MyMap.clear();