Wininet / HttpRequest memory usage

Started by
4 comments, last by necr0 22 years, 5 months ago
Hi I have an app that uses Wininet (and another that uses httpRequest object) to get a page from a web page from a server. Each time InternetOpen and HttpOpenRequest are called the Mem Usage in the task manager goes up by a large amount then when I close and release everything it does not go down again. Doing this a few times creates a high amount of memory usage. Does anyone know if there is a bug in Wininet or something???? pleas help my obiwan, youre my only hope.
That is not dead can eternal lie, and even in sleep death may die.
Advertisement
Make sure you call InternetCloseHandle on ALL handles returned to you from WinInet
InternetCloseHandle id called for all handles and they are then set to NULL.

The same thing happens in the HttpRequest object (part of the XML SDK from microsoft) which is built on top of WinInet.

Does anyone know of another way to make GET and POST http requests thats nicer on memory?
That is not dead can eternal lie, and even in sleep death may die.
Well, you could just use sockets and build your own HTTP headers

Dire Wolf
www.digitalfiends.com
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
I second that: to send your own HTTP request takes little more than a couple of pages'' of code. Well worth learning, if you''re concerned about the overhead of using built-in objects and the like.
I have used sockets before for HTTP, but I lost the code and I wanted to get up and running quickly. Oh well I will re-code.
That is not dead can eternal lie, and even in sleep death may die.

This topic is closed to new replies.

Advertisement