cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Oct 2008 13:22:20 +0200 (CEST)

On Tue, 21 Oct 2008, Vijay wrote:

> //Close the connection
> curl_easy_cleanup(m_ptrCurl);
> //curl_free(m_ptrCurl);
> curl_global_cleanup();

curl_global_cleanup is a global cleanup (and the corresponding
curl_global_init) that should only ever be done once your program is done
using libcurl. Using them in a loop of any kind is wrong.

> Because of these am getting memory leak in my code.

How can you tell? On what platform? Using what SSL library? Using what libcurl
version? Are you sure the leak isn't simply in your application code?

-- 
  / daniel.haxx.se
Received on 2008-10-21