curl-library
Re: memory leak using libcurl
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 11 Jul 2011 13:55:56 -0700
Date: Mon, 11 Jul 2011 13:55:56 -0700
On Tue, Jul 12, 2011 at 12:40:54AM +0400, Outlandish . wrote:
> In my function I used and it worked
> curlClass test1(url,urlfilename);
> test.get();
>
> but when I used it in other function
> curlClass test2(url,urlfilename);
> test.get();
>
> it give memory leak
The code snippet you supplied doesn't not call curl_global_cleanup(). To
get full control over memory usage in libcurl, the code must explicitly
call curl_global_init() and curl_global_cleanup().
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-11