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

# mongoc\_client\_destroy(3)

## SYNOPSIS

```
void
mongoc_client_destroy (mongoc_client_t *client);
```

Release all resources associated with **client** and free the structure. Does nothing if **client** is NULL.

Only call *mongoc\_client\_destroy()* on a single-threaded client. Do not call on a *mongoc\_client\_t* obtained from a *mongoc\_client\_pool\_t*, which should instead be pushed back with *mongoc\_client\_pool\_push()*.

## PARAMETERS

- •

  **client**: A *mongoc\_client\_t*.

**SEE ALSO:**

```
mongoc_client_pool_push() to push a multi-threaded client back onto a pool.
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
