2008-7-18 13:38:03 started a CodeGuard(tm) process: Client.exe(3312) Resource leak in process: TigerClient.exe(3312) - sys\system.pas#2655 The memory block (0x12151A0) was never freed The memory block (0x012151A0) [size: 28 bytes] was allocated with SysGetMem 0x004A7D6A - sys\system.pas#2655 0x00641299 0x0064146F
如果拿掉 TIdTCPClient控件,则没有问题
------解决方案-------------------- 断开前释放InputBuffer
if (IdTCPClient1->IOHandler->InputBuffer->Size) IdTCPClient1->IOHandler->InputBuffer->Clear(); IdTCPClient1->IOHandler->CloseGracefully(); IdTCPClient1->Disconnect();