---
name: "bson_reader_set_destroy_func"
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_reader_set_destroy_func"
---

# bson\_reader\_set\_destroy\_func(3)

## SYNOPSIS

```
void
bson_reader_set_destroy_func (bson_reader_t *reader,
                              bson_reader_destroy_func_t func);
```

## PARAMETERS

- •

  **reader**: A *bson\_reader\_t*.

- •

  **func**: A *bson\_reader\_destroy\_func\_t*.

## DESCRIPTION

Allows for setting a callback to be executed when a reader is destroyed. This should only be used by implementations implementing their own read callbacks.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
