DOKK / manpages / debian 10 / libbson-doc / bson_reinit.3.en
BSON_REINIT(3) Libbson BSON_REINIT(3)

bson_reinit - bson_reinit()

void
bson_reinit (bson_t *b);


b: A bson_t.

The bson_reinit() function shall be equivalent to calling bson_destroy() and bson_init().

However, if the bson_t structure contains a malloc()'d buffer, it may be reused. To be certain that any buffer is freed, always call bson_destroy on any bson_t structure, whether initialized or reinitialized, after its final use.

MongoDB, Inc

2017-present, MongoDB, Inc

February 23, 2019 1.14.0