bson_reinit() — libbson 1.6.3

- libbson 1.6.3 »
- API Reference »
- bson_t

# bson_reinit()

## Synopsis

    void
    bson_reinit (bson_t *b);

## Parameters

- `b`: A bson_t.

## Description

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.

### See Also:

bson_concat

bson_init

bson_init_from_json

bson_init_static

bson_new

bson_new_from_buffer

bson_new_from_data

bson_new_from_json

bson_reserve_buffer

bson_sized_new

Created using Sphinx 1.5.3, based on Sphinx Readable Theme.