i use curl_easy_setopt(_curl, CURLOPT_WRITEFUNCTION, &writeFun) to set up the WRITE_FUNCTION, and it is called by libcurl when it gets datas. the funtion writeFun() is like below:
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? thanks.
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
