I develop MFC Extension DLL and I have an problem with Memory leaks issue. I try
to use the The User-Mode Dump Heap (UMDH) tool, Umdh.exe that come with Microsoft debugging tools
After I used umdh.exe to checked the Heap I found this
CCallSumData::CCallSumData(CCallSumData& source)
{
//some code here
callNum = source.callNum;
//some code here
}
the above copy constructor is call from below:
void CContext::Add(CCallSumData& call)
{
CCallSumData* pCopy = new CCallSumData(call);
m_vVector.insert(m_vVector.begin(), pCopy);
}
and It have 'Remove()' function to 'delete pCopy' in the CContext class.
the m_vVector is a Vector to keep the CCallsumData object to use later.
and I try to check and look at the header file of std::string (xstring.h). I see from stack trace it's call _Grow() and _Copy and I
try to set the 'reserve' at the initialize time but it not help
and I also try to call ~basic_string() to clean up/release resource but it did not help also.
Any one have any idea? Any suggestion are welcome.
Bookmarks