typedef std::vecotr<MyClass*> MyVec;
typedef std::map<string, MyVec> MyMap;

MyVec* myVec1 = new MyVec();
myVec1->push_back(new MyClass("1_1"));
myVec1->push_back(new MyClass("1_2"));

MyVec* myVec2 = new MyVec();
myVec2->push_back(new MyClass("2_1"));
myVec2->push_back(new MyClass("2_2"));

MyMap* myMap = new MyMap();
myMap->insert(pair<string, MyVec>("name1", *myVec1));
myMap->insert(pair<string, MyVec>("name2", *myVec2));

question 1)
How to delete the myMap without any memory leak? Seem there is no direct way, we need to iterate over the map and vector, and do "delete" level by level, right?
Any better way? (Source code is prefered)

quesiont 2)
MyMap aMap;
aMap = *myMap;
This assignment ("=") operation is deep copy or shallow copy?


YOur answer is appreciated. Thanks.