On Thu, Mar 18, 2010 at 3:55 AM, Basil Su wrote:

> size_t writeFun(void *ptr, size_t size, size_t nmemb, void *stream)

> ptr is the pointer to the data, so i could get the download data in my
> program. and then i could write the data to a local file. now the problem
> is: should i free(ptr) when i've done using it to avoid memory leek?

No, that pointer is managed by libcurl. You should not free it or modify it.

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

Reply via email to