|
|
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: Tue, 24 Nov 2009 11:47:30 -0800
On Tuesday 24 of November 2009 19:53:04 Dantzler, DeWayne C wrote:
On Tuesday 24 of November 2009 Kamil Dudka wrote:
>> If you want to get more help from us, you'll need to write something like a minimal example we can compile and run.
==============================================================
I'm not calling curl_global_init()/curl_global_cleanup() more than once. I'm calling them only once. Xerces is a 3rd party library and I have no access to the source or know how they are using curl in the their library. This is a large C++ application and I'm using curl in only one class. In my ctor, I call curl_global_init() first then make a call to curl_easy_init(). According to the curl documentation, if you call curl_global_init(), you should call curl_global_cleanup(). Likewise it says if you call curl_easy_init(), then you should call curl_easy_cleanup(), but when I do this the application crashes with a SIGSEGV, Segmentation fault.
The call stack shows:
If I only call curl_global_cleanup() in the dtor, the application does not crash, but it leaks memory as reported by PurifyPlus.
These mail archives are generated by hypermail. |
Page updated November 16, 2009.
web site info