typedef map<int,myClass*> MYMAP;
MYMAP MyMap;
MYMAP::iterator MyIter;
//here add some elements to MyMap
//walk through
for(MyIter = MyMap.begin(),MyIter != MyMap.end(); MyIter++)
{
//access the value in the map;
assert(MyIter->second);
delete MyIter->second;
}