Does destructor get called on std::map elements when std::map::clear is used?
I tried to debug for std::map<string,string> but could not see std::string destructor getting invoked. Can any one please help my understanding?
Documentation states it gets called, but I could not notice it.
Documentation is right, it does get called.
The destruction will be done by the method
std::allocator<T>::deallocate(). Trace through that in your debugger.http://www.cplusplus.com/reference/std/memory/allocator/