Some of our public functions, like mongoc_collection_create_bulk_operation, are marked with the attribute BSON_GNUC_WARN_UNUSED_RESULT, which gives a compiler warning if the caller does not inspect the returned value (which in that case, because they should at the very least destroy the mongoc_bulk_operation_t returned).
Not all functions that return handles that must be cleaned up have this attribute, (e.g. mongoc_collection_watch and possibly others).