A
Allerdyce.John
I have a a stl map which use stl pair as the key
class A;
type map< pair<int, int>, A> MyMap;
if I have function which add entry to the map:
void func(int x, int y, MyMap& map, A& a) {
pair<int, int> key(x, y);
map[key] = a;
}
My question is what should i do to free the pair key of the map to
ensure there is no memory leak?
Thank you.
class A;
type map< pair<int, int>, A> MyMap;
if I have function which add entry to the map:
void func(int x, int y, MyMap& map, A& a) {
pair<int, int> key(x, y);
map[key] = a;
}
My question is what should i do to free the pair key of the map to
ensure there is no memory leak?
Thank you.