Ubuntu Manpages

DEPRECATED FEATURE: AUTOMATIC INITIALIZATION AND CLEANUP

On some platforms the driver can automatically call mongoc_init() before main, and call mongoc_cleanup() as the process exits. This is problematic in situations where related libraries also execute cleanup code on shutdown, and it creates inconsistent rules across platforms. Therefore the automatic initialization and cleanup feature is deprecated, and will be dropped in version 2.0. Meanwhile, for backward compatibility, the feature is enabled by default on platforms where it is available.

For portable, future-proof code, always call mongoc_init() and mongoc_cleanup() yourself, and configure the driver like:

cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF


MongoDB, Inc

2017-present, MongoDB, Inc