BSON_STRING_FREE(3) libbson BSON_STRING_FREE(3)

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


  • string: A bson_string_t.
  • free_segment: A bool indicating whether string->str should be freed.

Frees the bson_string_t structure and optionally string->str.

string->str if free_segment is false, otherwise NULL.

MongoDB, Inc

2017-present, MongoDB, Inc

March 31, 2024 1.26.0