G
Guru
struct TIdCategory
{
string category;
string id;
};
class CMyClass: public IMyClass
{
public :
CMyClass(const string& id, const string category);
virtual ~CMyClass();
....
....
private :
TIdCategory m_userCategory;
....
};
CMyClass::CMyClass(const string& id, const string category)
{
m_userCategory.id=id;
m_userCategory.category=category; <---------------------- Here it
giving Memory Leak by Purify
}
I am creating CMyClass object by new.
1) Why it is giving Memory Leak by Purify in string assigment ?
2) Is that really MLK?
3) If it is really MLK then in id assigment why it is not giving MLK?
-ashok
{
string category;
string id;
};
class CMyClass: public IMyClass
{
public :
CMyClass(const string& id, const string category);
virtual ~CMyClass();
....
....
private :
TIdCategory m_userCategory;
....
};
CMyClass::CMyClass(const string& id, const string category)
{
m_userCategory.id=id;
m_userCategory.category=category; <---------------------- Here it
giving Memory Leak by Purify
}
I am creating CMyClass object by new.
1) Why it is giving Memory Leak by Purify in string assigment ?
2) Is that really MLK?
3) If it is really MLK then in id assigment why it is not giving MLK?
-ashok