NNG_HTTP_RES_FREE(3http)
β¨ NNG_HTTP_RES_FREE(3http) β¨
okay so this is a page from the NNG Reference Manual (yes, that NNG, the nng(7) one, hi bestie π«Ά) and it's a tiny one but it's important so stay with me.
πΈ NAME πΈ
nng_http_res_free β frees an HTTP response structure. that's it. that's the whole job. she's a one-task icon π
π SYNOPSIS π
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
void nng_http_res_free(nng_http_res *req);
ngl the parameter is literally spelled req in the synopsis even though this whole page is about a response β i'm not touching it, we keep it exactly as written, no cap π
π¦ DESCRIPTION π¦
so nng_http_res_free() deallocates the HTTP response structure res entirely. like, gone gone. not "reset", not "reused", fully deallocated. main character exit, periodt π₯
Tip π‘ Instead of freeing and reallocating response structures, it is possible to reusereswithnng_http_res_reset(). lowkey a glow-up move β recycle instead of rebuild, the planet and your allocator both say thank you π
β RETURN VALUES β
None. nothing. void. she returns nothing and she's thriving π§
π ERRORS π
None. zero errors, zero drama. we love a peaceful function π
π SEE ALSO π
and that's the whole page bestie, go forth and free your responses responsibly π
signed off with love from the NNG Reference Manual, dated 2026-01-13 β NNG_HTTP_RES_FREE(3http), mwah πβ¨
π¦ where this page comes from
- alpine 3.24: nng-doc 1.11-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms