---
name: "bson_reinit"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_reinit"
---

# bson\_reinit(3)

## SYNOPSIS

```
void
bson_reinit (bson_t *b);
```

## PARAMETERS

- •

  **b**: A *bson\_t*.

## DESCRIPTION

Reinitializes a *bson\_t*.

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.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
