cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: getinmemory.c problems

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 2 Jan 2013 23:36:14 +0100 (CET)

On Fri, 28 Dec 2012, Dan Fandrich wrote:

>> 1. It calls realloc() every time through the callback. This is
>> terribly inefficient
>
> getinmemory.c is designed to be an easy-to-understand demonstration
> program, not a production-ready one.

I second Dan's objection here. I see no point in changing the fairly readable
and easy-to-read example with your more complicated version. I think the
original makes the point better.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-01-02