::AfxBeginThread(GetDataProc,(LPVOID)this);
UINT GetDataProc( LPVOID pParam )
{
sss *ctl = (sss*)pParam;
while(1)
{
ctl->fun();
}
return 0;
}
void sss::fun()
{
char *ff = new char [1000];
delete []ff;
ff = NULL;
}
UINT GetDataProc( LPVOID pParam )
{
sss *ctl = (sss*)pParam;
while(1)
{
ctl->fun();
}
return 0;
}
void sss::fun()
{
char *ff = new char [1000];
delete []ff;
ff = NULL;
}
{
ctl->fun();
}
死循环申请内存?
也不能完全称为泄漏,应该说是这么反复申请会造成内存碎片。其实内存碎片多了,感觉就象是泄漏