cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_slist_free

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 16 Dec 2002 11:20:49 +0100 (MET)

On Sun, 15 Dec 2002, Jean-Philippe Barrette-LaPierre wrote:

> I propose to add a new function: curl_slist_free. This function will do
> exactly the same thing than curl_slist_free_all, acexpt that it will not
> free the data pointers contained in the list. I propose that because in
> curlpp we manage the strings behind classes, so if the curl_slist_free_all
> deletes it, the aplication will crash.
>
> What do you think?

I disagree with this.

If you need a differently built slist list, I think you should build the list
yourself and then free the list yourself, as you see fit. I don't see any
particular reason why libcurl needs to provide yet another convenience-
function for a very rare case.

This is my own opinion of course.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
Received on 2002-12-16