cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_global_init()?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 29 Jun 2001 09:23:44 +0200 (MET DST)

On Fri, 29 Jun 2001, Jaepil wrote:

> Recently updated ibcurl to version 7.8.
>
> The new document said i must(?) call curl_global_init() and
> curl_global_cleanup() only once for each execution of my application.

It does indeed.

> What does really happen?

As the name might hint, it performs global initialisations. In real word
terms, right now, it means that it does some global init calls to OpenSSL.

If you don't call curl_global_init(), it will be done automatically when you
call curl_easy_init(), but there's no way for the library to automatically
call curl_global_cleanup().

> Will it genereate some kind of memory leak if i call it more than one
> time during the execution?

Now, why would you do that? No, invoking it several times will make no
difference, libcurl checks for that.

> Please give me some idea....

You know, the soure code is right there, it isn't very hard to check exactly
what it does.

(I'm leaving the country for a month on Tuesday, the countdown has started.)

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
http://curl.haxx.se/libcurl/
Received on 2001-06-29