On Tue, 6 Nov 2012, huancong deng wrote:

when i use curl_slist_append<http://curl.haxx.se/libcurl/c/curl_slist_append.html> to make my custom http head , must i free the memory like this?

curl_slist_free_all(headers); /* free the header list */

Yes!

i saw some example don't free the headers , like "httpcustomheader.c"

That's a bug. I fixed that example code just now. Thanks for pointing it out!

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to