1MONGOC_INIT(3) libmongoc MONGOC_INIT(3)
2
3
4
6 void
7 mongoc_init (void);
8
10 Initialize the MongoDB C Driver by calling mongoc_init() exactly once
11 at the beginning of your program. It is responsible for initializing
12 global state such as process counters, SSL, and threading primitives.
13
14 Exception to this is mongoc_log_set_handler(), which should be called
15 before mongoc_init() or some log traces would not use your log handling
16 function. See Custom Log Handlers for a detailed example.
17
18 Call mongoc_cleanup() exactly once at the end of your program to re‐
19 lease all memory and other resources allocated by the driver. You must
20 not call any other MongoDB C Driver functions after mongoc_cleanup().
21 Note that mongoc_init() does not reinitialize the driver after
22 mongoc_cleanup().
23
25 MongoDB, Inc
26
28 2017-present, MongoDB, Inc
29
30
31
32
331.25.1 Nov 08, 2023 MONGOC_INIT(3)