From http://mongoc.org/libmongoc/current/mongoc_collection_t.html:
It is an error to call mongoc_collection_destroy() on a collection that has operations pending. It is required that you release mongoc_cursor_t structures before calling mongoc_collection_destroy().
From http://mongoc.org/libmongoc/current/mongoc_database_t.html
It is an error to call mongoc_database_destroy() on a database that has operations pending. It is required that you release mongoc_cursor_t structures before calling mongoc_database_destroy.
From http://mongoc.org/libmongoc/current/mongoc_client_t.html:
It is an error to call mongoc_client_destroy on a client that has operations pending. It is required that you release mongoc_collection_t and mongoc_database_t structures before calling mongoc_client_destroy.
Per discussion on Slack, mongoc_cursor_t only cares about mongoc_client_t. Is that true for other types as well? Please audit lifecycle constraint documentation and update as needed.
- is depended on by
-
CXX-1184 Prevent misuse of client temporaries
- Closed
- is duplicated by
-
CDRIVER-963 Document object-destruction order
- Closed