cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak observed while using libcURL

From: Raja Gopal M <smrajagopal_at_gmail.com>
Date: Sun, 1 Mar 2015 19:12:08 -0600

> Never? So what happens if you call *cleanup on all easy handles and the
multi handle? Is that memory truly lost?
Calling *cleanup functions does release the memory. Being said that, my
current application which detected the memory leaks only calls *cleanup
functions when CURLMSG_DONE for that easy handle is received from libcURL.

>I would say that the connect timeout should be used for that. Isn't it
being acknowledged?
That is the interesting question I have. CURLOPT_CONNECTTIMEOUT is set
(60seconds) for each of the easy handle being added to the multi handle. I
read the following line in libcURL documentation,
"This only limits the connection phase, it has no impact once it has
connected"
Agree that for easy interface. In multi interface, when the connection to
the server is already made by another easy handle and when
CURLMOPT_MAX_TOTAL_CONNECTIONS
<http://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html> is set
to 1, does libcURL care about the CURLOPT_CONNECTTIMEOUT for the new easy
handle(which in my case never get to get a connection to the server) at all
? Currently, I don't see either the requests being dropped or the resources
getting released after the set time. Logs attached in the original post is
the proof.

-- 
Thanks
Raja Gopal M
smrajagopal_at_gmail.com

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