NNG_MSG_FREE(3)
π NAME π
nng_msg_free β free a message, bestie. that's it. that's the whole job. π«Ά
π SYNOPSIS π
#include <nng/nng.h>
void nng_msg_free(nng_msg *msg);
like yes queen, one line of code, zero drama β¨
πΈ DESCRIPTION πΈ
okay so, you know how you made a message with nng_msg_alloc(3) and it was everything, main character energy, holding all your beautiful little bytes? π¦ well bestie, every icon needs a graceful exit.
The nng_msg_free() function deallocates the message msg entirely. not partially. not "mostly". entirely. the whole thing. the entire message. gone. released. returned to the void. π
"entirely" is doing heavy lifting there and I need you to feel that. this isn't a gentle trim, it's a full send-off.
no cap: once it's freed, that message is NOT coming back. don't touch msg afterwards. that's giving use-after-free and that is not the vibe. π
π RETURN VALUES π
None. she returns nothing. no value, no receipt, no goodbye text, just vibes and a chunk of memory politely handed back. π
π ERRORS π
None. literally cannot fail. cannot error. this function simply ate and left no crumbs. π₯
π SEE ALSO π
nng_msg_alloc(3)β where the message came from in the first placenng_msg_realloc(3)β when you need her to grow/shrinknng_msg(5)β the whole message famnng(7)β the big picture, iykyk
and that's the whole page, bestie!! this one's from the NNG Reference Manual, dated 2026-06-30 β go forth, free your messages, and remember: every nng_msg_free() is an act of self-care for your heap. periodt. πβ¨π§
π¦ 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