Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Memory leak using TClientSocket

www.cryer.info
Managed Newsgroup Archive

Memory leak using TClientSocket

Subject:Memory leak using TClientSocket
Posted by:i..@bluechipbridge.co.uk
Date:3 Oct 2006 05:17:43

I'm using a TClientSocket from the Internet tool palette.  If I run
more than one copy of my program and have each of them talk to a
TServerSocket, when I close the client programs, one or more them
(usually two or three) show a memory leak in Windows Task Manager of
about 7KB (slightly different for each program).

If I don't use the sockets, there's isn't a leak.  Also, setting
"ReportMemoryLeaksOnShutdown := DebugHook <> 0" doesn't show up the
leak.

There's a reference to a TClientSocket leak in Quality Central 12266.
The resolution from Robert Ehteshamzadeh says that TClientSocket is
deprecated.  If that's so, what is the recommended way of making a
simple TCP/IP connection without generating the memory leak ?

Replies:

www.cryer.info
Managed Newsgroup Archive