用CodeGuard捕捉到程序关闭时的错误,请进来帮忙看看!thx~
void __fastcall ThreadRecv::Execute()
{ ......
......
while ( !Terminated )
{
......
......
tvSelect.tv_sec = 0;
tvSelect.tv_usec = 500 * 1000;
if ( select(FD_SETSIZE, &fds_t, NULL, NULL, &tvSelect) < 0 )
{
continue;//最后提示出错在这里。
}
......
......
}
}
CodeGuard Log:
Access in freed memory:...
the memory block ... was allocated with SysGetMem. //这里提示在continue
the memory block ... was freed with SysFreeMem.//这里提示在FormDestroy的函数
这是怎么回事?访问已经删除的东西?怎么解决?谢谢