NNG_FREE(3)

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

✨ NAME ✨

nng_free β€” free memory πŸ’–

okay so this is the NNG_FREE(3) page from the NNG Reference Manual, and it is literally all about giving memory back. no cap.


πŸ› οΈ SYNOPSIS πŸ› οΈ

#include <nng/nng.h>

void nng_free(void *ptr, size_t size);

🌸 DESCRIPTION 🌸

The nng_free() function deallocates a memory region of size size, that was previously allocated by nng_alloc() or nng_recv() with the NNG_FLAG_ALLOC flag. that's the whole vibe bestie. πŸŽ€

Important β€” it is very important that size match the allocation size used to allocate the memory. fr fr. do not play games with the size. 😭
Important β€” do not attempt to use this function to deallocate memory obtained by a call to the system malloc() or calloc() functions, or the C++ new operator. doing so may result in unpredictable behavior, including corruption of application memory. that's not a cute look. that's a πŸ’€ look. do not do it.

🫢 RETURN VALUES 🫢

None.

like, it returns nothing. no little gift. no surprise. just none. ✨


πŸ’€ ERRORS πŸ’€

None.

no errors listed. zero. nada. she's not giving error codes on this page. πŸ¦‹


πŸ‘€ SEE ALSO πŸ‘€


okay bye bestie! this page came from the NNG Reference Manual, page/version NNG_FREE(3), dated 2026-06-30. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from