1curl_global_cleanup(3)          libcurl Manual          curl_global_cleanup(3)
2
3
4

NAME

6       curl_global_cleanup - global libcurl cleanup
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       void curl_global_cleanup(void);
12

DESCRIPTION

14       This function releases resources acquired by curl_global_init(3).
15
16       You  should  call curl_global_cleanup(3) once for each call you make to
17       curl_global_init(3), after you are done using libcurl.
18
19       This function is not thread safe. You must not call it when  any  other
20       thread  in  the program (i.e. a thread sharing the same memory) is run‐
21       ning.  This does not just mean no other thread that is  using  libcurl.
22       Because  curl_global_cleanup(3) calls functions of other libraries that
23       are similarly thread unsafe, it could conflict with  any  other  thread
24       that uses these other libraries.
25
26       See  the  description  in libcurl(3) of global environment requirements
27       for details of how to use this function.
28

CAUTION

30       curl_global_cleanup(3) does not block waiting for  any  libcurl-created
31       threads  to  terminate  (such as threads used for name resolving). If a
32       module containing libcurl is dynamically unloaded while libcurl-created
33       threads  are still running then your program may crash or other corrup‐
34       tion may occur. We recommend you do not run  libcurl  from  any  module
35       that may be unloaded dynamically. This behavior may be addressed in the
36       future.
37

EXAMPLE

39        curl_global_init(CURL_GLOBAL_DEFAULT);
40
41        /* use libcurl, then before exiting... */
42
43        curl_global_cleanup();
44

AVAILABILITY

46       Added in 7.8
47

RETURN VALUE

49       None
50

SEE ALSO

52       curl_global_init(3), libcurl(3), libcurl-thread(3),
53
54
55
56libcurl 7.82.0                 November 26, 2021        curl_global_cleanup(3)
Impressum