BSON_NEW(3)
β¨ BSON_NEW β¨
okay so real quick β this page lives in libbson, section 3 of the manual, and it's literally the shortest lil glow-up you'll ever read. bestie, it's about one function. one. and it ate. π
πΈ SYNOPSIS πΈ
bson_t *
bson_new (void);
no args, no drama, no options to remember. she just exists. π«Ά
π¦ DESCRIPTION π¦
so the bson_new() function shall create a new bson_t structure on the heap. like, on the heap. malloc vibes. it's giving main character energy, but it's also giving responsibility β you gotta free it with bson_destroy() when it is no longer in use. don't just ghost your bson_t, bestie, that's a memory leak and the vibe check will NOT pass. π
ngl, this is the part everyone forgets:bson_new()gives you a shiny new heap-allocatedbson_t, andbson_destroy()is the one who cleans up after the party. they're a package deal. iykyk. π
β RETURNS β
a newly allocated bson_t that should be freed with bson_destroy(). yup. that's the whole return section. she's simple, she's iconic, she's literally a pointer. β¨π₯
π AUTHOR π
MongoDB, Inc β the icons behind it all. slay. π
π COPYRIGHT π
2009-present, MongoDB, Inc. β yeah, they've been at this a minute. periodt. π
okay that's the whole page, hope you enjoyed the shortest manpage tour ever π§
libbson 2.5.6 π¦ β dated Oct 09, 2026, and that's the whole footer, mwah. π no cap, go call bson_destroy(). π
π¦ where this page comes from
- epel 10: libbson-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