MONGOC_CLIENT_POOL_DESTROY(3)
π MONGOC_CLIENT_POOL_DESTROY π
okay bestie, this is the mongoc_client_pool_destroy(3) page from libmongoc, and it's literally the "bye bye pool" function π«Ά
β¨ SYNOPSIS β¨
void
mongoc_client_pool_destroy (mongoc_client_pool_t *pool);
πΈ DESCRIPTION πΈ
So like, this one frees all resources associated with pool, including freeing the structure itself. Like fully yeeting it into the void, no cap π
Here's the part you CANNOT skip, bestie β every single mongoc_client_t object you got from mongoc_client_pool_pop() from pool must be pushed back onto the pool with mongoc_client_pool_push() prior to calling mongoc_client_pool_destroy(). Like, put your clients back in the toybox before you throw the toybox away, mkay? π
β οΈ Vibe check, and it FAILS: this method is NOT thread safe, and must only be called by one thread. One. Singular. Main character energy only, no group chat. π
It should be called once the application is shutting down, and after all other threads that use clients have been joined. Like, wait for the group chat to go quiet before you close it, yk? π₯
π PARAMETERS π
- pool β A
mongoc_client_pool_t. That's it, that's the whole list, she's low maintenance π
π AUTHOR π
MongoDB, Inc β iconic of them fr fr
π COPYRIGHT π
2009-present, MongoDB, Inc.
β aaaand that's the page! this lovely little doc came from libmongoc version 2.5.6, dated Oct 09, 2026 β go destroy those pools responsibly, bestie, and remember: push your clients back first π
β¨π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms