curl-library
Properly freeing resources
Date: Tue, 10 Sep 2002 20:26:23 +0200 (CEST)
Hi!
I got the following scenario:
1. I'm initializing libcurl in a function named libcurl_init(), which
reads certain parameters (proxy, no proxy URLs, etc.) from a file, passes
them to various curl_easy_setopt() calls and returns a CURL*.
2. I'm passing this CURL* to a function doing form handling (example given
in my previous mail). This function sets all the parameters required for
form passing (curl_formadd() and curl_easy_setopt()). The function
returns a CURL*
3. The returned CURL* from the function mentioned in 2. is passed to
curl_easy_perform() to do the actual work. After curl_easy_perform() the
CURL* is passed to curl_easy_cleanup().
Now I'm sort of stuck since I'm aware I'm supposed to call
curl_formfree() and curl_slist_free_all() to properly free the resources
required for form handling, but I can't (because they are needed for
curl_easy_perform()). Will calling curl_easy_cleanup() also take care of
freeing resources needed for form handling?
Thanks in advance for any advice!
Kind regards,
Holger
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-09-10