NNG_STATS_FREE(3)
π nng_stats_free(3) β the NNG Reference Manual, bestie edition
okay so picture this: you went and collected a whole stats snapshot with nng_stats_get(), you looked at it, you felt cute, you understood your program's β¨journeyβ¨. and now? now you gotta clean up after yourself, because the snapshot is a whole tree of allocated stuff and it's not gonna free itself. that's literally what nng_stats_free() is for. it's the moment where you say "thanks for the memories" and let it go π¦
π 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 that you previously collected with nng_stats_get(). like, once you call it, everything associated with that snapshot is invalidated β every value in there is gone-gone, no cap. if you try to peek at it after this, that's on you and it's not gonna be pretty π
β οΈ Important, and I mean this with my whole chest: only the top of the collected statistics tree can be freed using this function. the top. the root. the main character π not the little nodes hanging off it. don't be out here passing random inner nodes to this thing, bestie, that is not the vibe.
π RETURN VALUES
None. nothing. it's a void. it just does the thing and dips π¨
π ERRORS
None. no error codes, no drama, no tears. it's giving peaceful exit β¨
π SEE ALSO
nng_stats_get(3)β the one that actually gets you the snapshot in the first place, iykyknng_stat(5)β all the lore on what a stat actually isnng(7)β the big picture, the mothership
and that's the whole page, periodt π this one came straight out of the NNG Reference Manual, dated 2026-06-30 β go free your snapshots responsibly, love u, bye π«Άπβ
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms