BSON_STRING_FREE(3)

πŸ’– BSON_STRING_FREE πŸ’–

okay bestie so we're in the libbson manual, section 3, and today's main character is bson_string_free β€” she's here, she's serving, and she's lowkey retired 😭 so read the warning before you get attached, fr fr.


⚠️ WARNING ⚠️

Deprecated since version 1.29.0. 🚫 She's a legacy icon, not a current one. Do not build new stuff on this, bestie, I'm begging. πŸ’€

✨ SYNOPSIS ✨

char *
bson_string_free (bson_string_t *string, bool free_segment);

like… that's it. two args. she's simple. she's elegant. she's deprecated. 🌸


πŸŽ€ PARAMETERS πŸŽ€

  • string β€” a bson_string_t. that's the girl. the whole point. the moment. πŸ‘‘
  • free_segment β€” a bool that tells us whether string->str should be freed. so it's giving "do we also throw out the actual text, or are we keeping it?" πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

Frees the bson_string_t structure β€” and optionally string->str too, depending on what you said for free_segment. not me giving you a choice, bestie, that's literally what the flag is for 😌✨


πŸ”₯ RETURNS πŸ”₯

  • if free_segment is false β†’ you get string->str back 🫢
  • otherwise β†’ NULL πŸ™ˆ

that's the whole vibe check. no cap.


🌈 AUTHOR 🌈

MongoDB, Inc β€” the icons themselves πŸ‘‘


2009-present, MongoDB, Inc. πŸ₯°


and that's the tea, bestie ✨ this was BSON_STRING_FREE(3) from libbson, version 1.30.13, dated Oct 09, 2026 β€” she's deprecated but she's still eating, periodt. go free your strings responsibly, mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from