Article View: borland.public.cppbuilder.internet.socket
Article #695Re: TIdTCPServer Memory Leak
From: Mark Roberts
Date: Fri, 09 Nov 2007 17:43
Date: Fri, 09 Nov 2007 17:43
40 lines
2326 bytes
2326 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:473379be$1@newsgroups.borland.com... > > "Mark Roberts" <markr@piracle.com> wrote in message > news:47336f10$1@newsgroups.borland.com... > >> I'm using Indy's TIdTCPServer component in C++ Builder 6.0 >> and getting a memory leak. > > You need to be more specific. What is leaking exactly? How do you know > that it is a leak to begin with? > > > Gambit > My app is running as a service. It uses a TIdTCPServer component to communicate with clients. As I watch the Processes screen of the Task Manager I see the process continually growing as the clients connect and disconnect. I'm calling AThread->Connection->Disconnect in the OnExcute function and AThread->StopMode = smTerminate; AThread->Stop(); TCPServer->ThreadMgr->ReleaseThread(AThread); TCPServer->ThreadMgr->TerminateThreads(TCPServer->ThreadMgr->ActiveThreads); in the OnDisconnect function. Even when I comment out all code in the OnExecute routine other than the ATread->Connection->Disconnect the service continues to grow. Googling TIdTCPServer seems to indicate that this component leaks memory but I can't find a solution. Any insights would be greatly appreciated. Mark
Technical Details
Message-ID:
<47349c3a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<47336f10$1@newsgroups.borland.com> <473379be$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,8e59db61125c85b X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mark Roberts" <markr@piracle.com> From: "Mark Roberts" <markr@piracle.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <47336f10$1@newsgroups.borland.com> <473379be$1@newsgroups.borland.com> Subject: Re: TIdTCPServer Memory Leak Date: Fri, 9 Nov 2007 10:43:24 -0700 Lines: 42 Organization: Piracle, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 67.104.2.131 Message-ID: <47349c3a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1194630202 67.104.2.131 (9 Nov 2007 09:43:22 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail