|
|
cURL Mailing List Monthly Index Single Mail
curl-library Archives
RE: What is the proper way to get libcurl to free it resources when used within a C++ Class?
From: Dantzler, DeWayne C <dewayne.c.dantzler_at_boeing.com>
Date: Fri, 27 Nov 2009 04:58:47 -0800
On Tuesday 24 of November 2009 01:50:02 Dantzler, DeWayne C wrote:
Kamil wrote:
It doesn't matter what programming paradigma are you actually using. Just call
Then for each curl_easy_init() you should call one curl_easy_cleanup(). You can wrap it to class and call the functions in its ctor/dtor. Or perhaps use cURLpp binding which does the job for you?
Looking at your example again, one thing is clear. You can't call
=============================================================
I took your suggestions to try a Singleton and it worked!! Placing the calls to curl_global_init() and curl_easy_init() in the ctor of the Singleton and curl_easy_cleanup()/curl_global_cleanup() in the dtor did not result in a crash or memory leaks.
These mail archives are generated by hypermail. |
Page updated November 16, 2009.
web site info