hi,,,
i am getting memory leaks in my application when i use winhttp functions like WinHttpGetIEProxyConfigForCurrentUser(),WinHttpOpen(),,,,and many others,,,,,how to deal with it???

well thanks for your reply,,,i already searched on google but couldnt find any solution and i guess its better to search there more instead wasting time in reading that stupid doc

Post some code, and convince us that you've RTFM

The caller must free the lpszProxy, lpszProxyBypass and lpszAutoConfigUrl strings in the WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure if they are non-NULL. Use GlobalFree to free the strings.

its better to search there more instead wasting time in reading that stupid doc

Only stupid to those who are too lazy to read and learn from their mistakes.

The caller must free the lpszProxy, lpszProxyBypass and lpszAutoConfigUrl strings in the WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure if they are non-NULL. Use GlobalFree to free the strings.


I have already done a GlobalFree for non-NULL.The above function call returns true and value is null for above parameters and then still a memory leak.

On what information are you saying there is a memory leak?
- watching task manager
- output from the debug heap

Have you checked ALL your functions for such memory free requirements?

Is there some 'WinHttpShutdown' function you need to call at the end to free all the internal resources of the WinHttp service?

This article has been dead for over six months. Start a new discussion instead.