I have a C++ application developed on Visual Studio 2008 On the following code I get a memory leaks like:
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {8386} normal block at 0x11BF9DB0, 25 bytes long. Data: < 3C 4E 4B 55 08 00 00 00 08 00 00 00 01 00 00 00
I have tried many versions, and sure that there is no memory leak here. Is it a defect in CString? How can I by-pass this?
void fff(CString &s1,CString &s2)
{
int nSize =100;
TCHAR *xx = new TCHAR[100];
::GetEnvironmentVariable( s1, xx, nSize );
CString sss(xx);
s2 = sss;
delete[] xx;
}
I also get many such leaks on a freshly created MFC application