curl-library
newbie question
From: Michael Mastroianni <MMastroianni_at_choicestream.com>
Date: Tue, 24 Aug 2004 15:48:51 -0400
Date: Tue, 24 Aug 2004 15:48:51 -0400
Suppose I want to get the effective url for a download. My understanding
is that I do:
getUrl(const std::string & url, std::string results, std::string
effectiveUrl)
...
char *newurl = NULL;
curl_easy_getinfo(curlHandle_, CURLINFO_EFFECTIVE_URL,
&newurl);
effectiveUrl = newurl ;
Now, I don't want to leak. Do I do
delete newurl
Or
free(newurl)
or
curl_free(newurl)
?
I think the last one is right, from the documentation, but I wanted to
be sure.
Received on 2004-08-24