cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl & STL memory problem

From: Pavel Orehov <pcarlo_at_bezeqint.net>
Date: Mon, 10 Jan 2005 17:52:51 +0200

Hi,

I met some strange problem when using Curl & STL.
I am registering to callback function to receive headers with
curl_set_opt(CURLOPT_HEADERFUNCTION, ...) function.
In this callback function i am allocation memory with STL (
std::string tmp(...) ) that hold headers data.
After this memory allocation with STL in callback function, i
see junk in url in libcurl.
I am using curl_multi_perform and this problem occurs when
adding with curl_multi_add more than several handlers (5+).
I have tried to write all code in callback function in native
c and not c++ and this problem not happens.
So i think or it is some problem because c & STL together or
there is some other memory ovelap that become in this point.

Thanks,
Pavel.
Received on 2005-01-10