---
name: "nng_stats_free"
section: "3"
platform: "linux"
package: "libnng-dev"
version: "1.10.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nng_stats_free"
---

# nng\_stats\_free(3)

free statistics snapshot

## NAME

nng\_stats\_free - free statistics snapshot

## SYNOPSIS

```
#include <nng/nng.h>
typedef nng_stat nng_stat;
void nng_stats_free(nng_stat *);
```

## DESCRIPTION

The `nng_stats_free()` function deallocates a statistics snapshot previously collected with `nng_stats_get()`. After calling this, all values associated with the snapshot are invalidated.

**Important**\

Only the top of the collected statistics tree can be freed using this function.

## RETURN VALUES

None.

## ERRORS

None.

## SEE ALSO

[nng\_stats\_get(3)](/nng_stats_get/3.md), [nng\_stat(5)](/nng_stat/5.md), [nng(7)](/nng/7.md)
