NNG_MSG_FREE(3)

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

πŸ’– 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 🌈


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