BSON_READER_DESTROY_FUNC_T(3)

πŸ’… BSON_READER_DESTROY_FUNC_T(3) πŸ’…

okay so bestie, welcome to the libbson side of the man pages β€” this one's a tiny little typedef and honestly it ate πŸŽ€


✨ SYNOPSIS ✨

typedef void (*bson_reader_destroy_func_t) (void *handle);

that's it. that's the whole vibe. it's a function pointer type, no cap 🫢


🌸 PARAMETERS 🌸

  • handle β€” the opaque handle you handed over to bson_reader_new_from_handle(). it comes right back to you here, like a boomerang but make it C πŸ’«

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this is an optional callback function. it gets called when a bson_reader_t (one that you made with bson_reader_new_from_handle(), specifically) is destroyed via bson_reader_destroy().

and the handle you used when you created that reader? yeah, that exact handle gets passed straight into this callback. main character energy, it remembers everything πŸ‘‘

lowkey iconic that it's optional β€” you don't have to provide one, but if you do, this is when it fires πŸ”₯


πŸ’œ AUTHOR πŸ’œ

MongoDB, Inc β€” the icons behind it all πŸŽ€


2009-present, MongoDB, Inc. β€” protecting the whole thing since '09, fr fr πŸ’…


and that's the page, bestie!! written up in libbson 2.5.6, dated Oct 09, 2026 β€” go forth and destroy your readers responsibly 😭🫢

πŸ“¦ where this page comes from