---
name: "bson_destroy"
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_destroy"
---

# bson\_destroy(3)

## SYNOPSIS

```
void
bson_destroy (bson_t *bson);
```

## PARAMETERS

- •

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

## DESCRIPTION

The *bson\_destroy()* function shall free an allocated *bson\_t* structure. Does nothing if **bson** is NULL.

This function should always be called when you are done with a *bson\_t* unless otherwise specified.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
