Scroll to navigation

MONGOC_COLLECTION_DESTROY(3) libmongoc MONGOC_COLLECTION_DESTROY(3)

SYNOPSIS

void
mongoc_collection_destroy (mongoc_collection_t *collection);


PARAMETERS

collection: A mongoc_collection_t <>.

DESCRIPTION

This function shall destroy a mongoc_collection_t <> and its associated resources. Does nothing if collection is NULL.

Warning:

Always destroy a mongoc_cursor_t <> created from a collection before destroying the collection.


Author

MongoDB, Inc

Copyright

2009-present, MongoDB, Inc.

December 11, 2025 2.2.1