I know that a map destructor calls each of the contained element’s destructors. What happens for a
map<char*,char*> ?
I cannot see where this code is in /usr/include/c++/4.4
EDIT:
I should have said
map<const char*, const char*, ltstr>
like in
Nothing. If you dynamically allocated memory, it’ll leak – there’s no automatic destructor for
char*.Use
std::stringor similar class instead.