cURL / Mailing Lists / curl-library / Single Mail


Re: I created a C++ wrapper to libcurl (!= curlpp) and worried about memory leaks

From: Patrick Louis <>
Date: Tue, 12 Feb 2013 14:33:56 +0200

On 2013-02-12 13:52, Daniel Stenberg wrote:
> On Tue, 12 Feb 2013, Patrick Louis wrote:
>> If someone could clear my mind about that or just lead me to a
>> better way to do things.
> Without your exact code it is hard to tell, but it seems to be an
> curl_slist list that you created with curl_slist_append() that's left
> allocated.
> If you build with debug symbols left, valgrind will tell you the
> exact source code line that did it.

Thanks a lot.
Your answer resolved my whole problem.
I reviewed the whole places where I used the curl_slist_append() and
directly freed the headers after use.
Now I have 0bytes leaked, fabulous.
I'm really glad that "the" Daniel Stenberg replied directly to me, I'm
a big fan of your works and included in my library a form grabber that
outputs exactly like the one you did in perl.

I'll push the updates to my git repo tonight (in 4-5 hours)

Again, thanks, you are an inspiration for the youth!

_Patrick Louis_
List admin:
Received on 2013-02-12