Here is an example :
pair< map<int, string>, map<int, string> > test;test = data;
So do i need to call clear
method before assign? Like this :
pair< map<int, string>, map<int, string> > test;test.first.clear();test.second.clear();test = data;
Or first example is correct without memory leaks?