cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: Re: [mem curl]

From: 左毅 <zuoy_at_neusoft.com>
Date: Fri, 06 Nov 2009 17:20:39 +0800

Sorry!!

Which one i should belive?

I am so confused now!

after all , thanks to both of them!


> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of 左毅
> Sent: Friday, November 06, 2009 4:17 PM
> To: curl-library
> Subject: [mem curl]
>
> Hi
>
> now i am vague with memery!
>
> if i use curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pmem)
>
> after curl_easy_perform implemetation, pmem will point
> to some memery ?

Usually, CURLOPT_WRITEDATA is associated with a file pointer (FIle *), which is obtained from fopen().
 
> and now ,what my question is that, how the memery was
> malloced? by malloc or realloc or other functions?
>
> besides, which function should i invoke to free the memery?

发件人: Daniel Stenberg
发送时间: 2009-11-06 17:16:07
收件人: libcurl development
抄送:
主题: Re: [mem curl]
 
On Fri, 6 Nov 2009, 左毅 wrote:

> if i use curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pmem)
>
> after curl_easy_perform implemetation, pmem will point to some memery?

You point it to whatever you like.

> and now ,what my question is that, how the memery was malloced? by malloc or
> realloc or other functions?

That's up to you and your application to decide!

> besides, which function should i invoke to free the memery?

That then depends on how you allocated it - if you did allocate it.

CURLOPT_WRITEDATA points to whatever data you want to point to. libcurl
doesn't touch it in any way.

--

  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-06

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET