---
name: "bson_new"
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_new"
---

# bson\_new(3)

## SYNOPSIS

```
bson_t *
bson_new (void);
```

## DESCRIPTION

The *bson\_new()* function shall create a new *bson\_t* structure on the heap. It should be freed with *bson\_destroy()* when it is no longer in use.

## RETURNS

A newly allocated *bson\_t* that should be freed with *bson\_destroy()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
