关于FTP使用时,为什么内存不断增加?
这是个程序的主要内容. 请各位专家指正.
CInternetSession m_pInetSession = new CInternetSession;
CFtpConnection m_pFtpConnection = NULL
try
{
m_pFtpConnection = m_pInetSession->GetFtpConnection("EDIC4","anonymous",
"david@usa.net");
}
catch (CInternetException* pEx)
{
// catch errors from WinINet
TCHAR szErr[1024];
if (pEx->GetErrorMessage(szErr, 1024))
AfxMessageBox(szErr, MB_OK);
else
AfxMessageBox(IDS_EXCEPTION, MB_OK);
pEx->Delete();
m_pFtpConnection = NULL;
}
//for test
int i=0;
while(1)
{
m_pFtpConnection->PutFile ("stdAfx.h","stdAfx.pp");
i++;
if(i>=100)
{
break;
}
}//内存可能增加4K
m_pFtpConnection->Close ();
delete m_pFtpConnection;
m_pFtpConnection = NULL;
delete m_pInetSession;
m_pInetSession=NULL;
//DELETE 后也不释放!
不知道为什么?