NNG_HTTP_HANDLER_FREE(3http)
π NNG_HTTP_HANDLER_FREE (3http)
okay bestie, welcome to the nng_http_handler_free page from the NNG Reference Manual β yes, the whole manual is like this and yes, it's a lot, but we're gonna get through it together π«Ά
β¨ NAME β¨
nng_http_handler_free β free an HTTP server handler, i.e. the little cleanup moment where your handler gets to go home π
β¨ SYNOPSIS β¨
#include <nng/nng.h>
#include <nng/supplemental/http/http.h>
void nng_http_handler_free(nng_http_handler *h);
no return value, no drama, just vibes and a void. periodt π
β¨ DESCRIPTION β¨
so the way that nng_http_handler_free() works is: it frees an allocated HTTP server handler. that's it. that's the whole job. it takes your handler h and releases it. iconic behavior, honestly πΈ
β οΈ important, and I mean it β οΈ it is an error to free a handler that is registered with a server. like, do not do that. ngl that's the one rule here and it's lowkey non-negotiable π
and before you panic about forgetting to clean up: any handlers that are registered with servers are automatically freed when the server itself is deallocated. so the server handles its own business β main character energy π
π RETURN VALUES π
None. literally none. it returns nothing, it says nothing, it just does the thing β¨
π ERRORS π
None. zero errors reported. a peaceful little function. we love a low-maintenance icon π
π¦ SEE ALSO π¦
go read those too, iykyk π
okay that's the page!! sign-off time: this gem is from the NNG Reference Manual, dated 2026-01-13, and the footer was serving NNG_HTTP_HANDLER_FREE(3http) realness. take care of your handlers, don't free registered ones, and stay slay π§ππ₯
π¦ 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