bson_destroy_with_steal (3) Linux Manual Page
bson_destroy_with_steal() – The bson_destroy_with_steal() function shall destroy a bson_t structure but return the underlying buffer instead of freeing it. If steal is false, this is equivalent to calling bson_destroy(). It is a programming error to call this function on a bson_t that is not a top-level bson_t, shuch as those initialized with bson_append_document_begin(), bson_append_array_begin(), and bson_writer_begin().
Synopsis
uint8_t *
bson_destroy_with_steal (bson_t *bson,
bool steal,
uint32_t *length);
Parameters
- bson
- A bson_t \&.
- steal
- A bool indicating if the underlying buffer should be stolen.
- length
- A location for storing the resulting buffer length.
