MONGOC_CLIENT_SESSION_DESTROY(3)

πŸ’… MONGOC_CLIENT_SESSION_DESTROY(3) πŸ’…

okay bestie, welcome to the libmongoc glow-up page where we learn how to say bye to a session properly ✨


✨ SYNOPSIS ✨

void
mongoc_client_session_destroy (mongoc_client_session_t *session);

πŸŽ€ DESCRIPTION πŸŽ€

So like, this function ends a session, gives its session id back to the pool, and frees, like, all the client resources tied to that session. Cleanup queen behavior, no notes πŸ‘‘

and listen β€” if there's a multi-document transaction in progress, this thing aborts it. no cap. so maybe wrap up your business first before you come for her πŸ™ˆ

also she's super chill: if session is NULL, she does absolutely nothing. does not care. does not read. does not respond. πŸ’€

go peek at the example code for mongoc_client_session_t if you wanna see her in action πŸ¦‹

🌸 PARAMETERS 🌸

  • session: A mongoc_client_session_t. that's the girl. that's who we're destroying (lovingly) πŸ’–

⭐ AUTHOR ⭐

MongoDB, Inc β€” icons, honestly 🫢

2009-present, MongoDB, Inc. protect it at all costs πŸ’œ


and that's the tea, bestie πŸ“ β€” libmongoc version 2.5.6, dated Oct 09, 2026, mwah πŸ˜˜πŸ’…

πŸ“¦ where this page comes from