bson_string_free() — libbson 1.9.2

- libbson 1.9.2 »
- API Reference »
- bson_string_t

# bson_string_free()

## Synopsis

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

## Parameters

- `string`: A bson_string_t.
- `free_segment`: A bool indicating if `str->str` should be returned.

## Description

Frees the bson_string_t structure and optionally the string itself.

## Returns

`str->str` if `free_segment` is true, otherwise NULL.

Created using Sphinx 1.6.5, based on Sphinx Readable Theme.