class A {
public :
list< string> getList (){
list< string> l;
l.push_back ("str1");
l.push_back ("str2");
....
return l;
}
}
A * a = new A();
list l = a->getList();
I'm working on readymade code, which has a memory leak. How to find exactly where the memory is not freed and there is a leak?