MONGOC_SESSION_OPTS_CLONE(3)

πŸ’… MONGOC_SESSION_OPTS_CLONE(3) β€” libmongoc era

okay so bestie, picture this: you've got a mongoc_session_opt_t and you literally just want another one that's identical. no drama, no deep-copy philosophy lecture, just a carbon copy. that's this function. it's short, it's sweet, it's giving "one job and it does it." πŸŽ€


✨ SYNOPSIS ✨

mongoc_session_opt_t *
mongoc_session_opts_clone (const mongoc_session_opt_t *opts);

Create a copy of a session options struct. that's it, that's the whole vibe. 🫢


🌸 PARAMETERS 🌸

  • opts β€” A mongoc_session_opt_t. the one you want cloned. hand it over, she'll take it from there πŸ’–

πŸ¦‹ RETURNS πŸ¦‹

A new mongoc_session_opt_t β€” fresh out of the oven, main character energy, all yours πŸ‘‘

⚠️ okay this part matters, don't skip it: that new struct must be freed with mongoc_session_opts_destroy(). not free(), not "eh it'll be fine", not "the garbage collector will get it" (there is no garbage collector, bestie 😭). call mongoc_session_opts_destroy() or that memory is just gonna sit there living rent-free forever. πŸ’€

🧚 AUTHOR 🧚

MongoDB, Inc β€” icons, honestly 🌈


2009-present, MongoDB, Inc. all the years, all the rights, periodt πŸ’…


and that's the whole page, bestie β€” short and slay ✨ this was libmongoc, version 2.5.6, dated Oct 09, 2026, page MONGOC_SESSION_OPTS_CLONE(3). now go free your structs πŸ“πŸ’œ

πŸ“¦ where this page comes from