Re: HELP!! CSocket and CAsyncSocket Consumes Memory Uncontrollably

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Which part of "you have a resource leak" do you have trouble
understanding?

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Roger Garrett" <RogerGarrett@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:58AC90AA-21A8-4A7A-94BD-F7AE8830AEA4@xxxxxxxxxxxxxxxx
> 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?
>


.



Relevant Pages

  • Re: Problem with Photo Resizer (Power Toy)
    ... Ramesh, Microsoft MVP ... Windows XP Shell/User ... The app is only working for .bmp files... ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: run a dll as an app
    ... You might want to see if the updated Remote Wonder software fixes your ... Jason Tsang - Microsoft MVP ... >>Windows isn't rocket science! ... Error signature is App Name rundll32.exe. ...
    (microsoft.public.windowsxp.general)
  • Re: start apps
    ... Microsoft MVP [Windows] ... | When I run an app on a server.. ... the app ususaly starts. ...
    (microsoft.public.windows.server.networking)
  • Re: automatically log on to workstation?
    ... Microsoft MVP [Windows] ... |I agree that the app should be run as a service, however, according to the app vendor, it does not | run as a service. ... The two apps are .exe files with shortcuts to the files placed in the Start Menu, | Programs, Startup folder. ...
    (microsoft.public.win2000.general)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)