65,211
社区成员
发帖
与我相关
我的任务
分享m_NpcList.DeleteAllItems();
for(map<long,CRole*>::iterator iter = m_oAllRole.begin(); iter != m_oAllRole.end(); iter++)
{
delete (*iter).second;
}
m_oAllRole.clear();char strTitle[MAX_PATH] = {0};
sprintf(strTitle, "title%d", iColum);
//string strTitleName = STitleIni.ReadText(strTitle, "name"); //注释这句,就不会有内存泄露!不注释,就会有!
int iTitleWidth = STitleIni.ReadInt(strTitle, "width"); //不注释这句,也不会有内存泄露!!!char strTitle[MAX_PATH] = {0};
sprintf(strTitle, "title%d", iColum);
string strTitleName = STitleIni.ReadText(strTitle, "name"); //注释这句,就不会有内存泄露!不注释,就会有!//这也会引起内存泄露????????
char strTitle[MAX_PATH] = {0};
sprintf(strTitle, "title%d", iColum);