NNG_STATS_FREE(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

πŸ’… 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, iykyk
  • nng_stat(5) β€” all the lore on what a stat actually is
  • nng(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