Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- From: "Roger Garrett" <RogerGarrett@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Aug 2005 08:13:10 -0700
IT'S WINDOWS VERSION SENSITIVE !
I did some extensive testing of this socket create/delete problem. It turns
out that it is sensitive to which version of Windows it is run under.
I wrote a really simple MFC dialog-based app that basically has a button
which, when clicked, does a large number of CAsyncSocket creations and
deletions.
The loop looks like this:
for (n = 0 ; n < nCount ; ++n)
{
CAsyncSocket* pSocket = new CAsyncSocket;
if (!pSocket->Create(0))
{
MessageBox("CAsyncSocket::Create failure","Socket problem");
}
delete pSocket;
}
By watching the Windows Task Manager I can see that the size of the
application increases as the sockets are created/deleted. Doing 10,000 socket
create/deletes causes the app to increase in size by over 12Mb. That is, that
happens when I run the app under Windows XP Home Edition. If I run it under
Windows 2000 there is no memory problem.
Does Microsoft know about this? Is there some way that I can notify them of
this situation?
.
- Follow-Ups:
- Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- From: Alexander Nickolov
- Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- References:
- HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- From: Roger Garrett
- Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- From: Eugene Gershnik
- Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- From: Arkady Frenkel
- HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- Prev by Date: Set up ssid automatically via dev
- Next by Date: Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- Previous by thread: Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- Next by thread: Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably
- Index(es):