请教个关于STL的问题。
假如现在已经建立的一个map<long,vector<CString> > mapVector,里面已经存在元素了。
1.现在想清空的话直接用mapVector.clear()会不会出现内存泄漏。
2.还是要自己手动把second清空了,再清空map。
map<long,vector<CString> >::iterator iter;
for(iter = mapVector.begin(); iter != mapVector.end(); iter++)
{
iter->second.clear();
}
mapVector.clear();