gnurl_multi_cleanup(3)
π gnurl_multi_cleanup(3) π
okay bestie, welcome to the libgnurl Manual β¨ β this one's the goodbye page, the "we're so done here" page, and honestly it's giving main character energy for cleanup. Let's get into it π«Ά
β¨ NAME β¨
curl_multi_cleanup β close down a multi session π§
πΈ SYNOPSIS πΈ
#include <gnurl/curl.h>
CURLMcode curl_multi_cleanup( CURLM *multi_handle );
like, that's it. that's the whole vibe. π
π¦ DESCRIPTION π¦
So this function cleans up and removes a whole multi stack. The entire thing. Gone. Iconic behaviour, no notes β¨
But β and this is the part where you gotta listen, bestie β it does not free or touch any individual easy handles in any way π Like, not even a little. They still need to be closed individually, using the usual curl_easy_cleanup(3) way. So don't be out here thinking the multi cleanup is gonna do your easy cleanup for you, because it will NOT and you'll be left with leaks and regrets π
The order of cleaning up should be, and I'm literally reading this off the group chat:
curl_multi_remove_handle(3)before any easy handles are cleaned up πcurl_easy_cleanup(3)can now be called independently since the easy handle is no longer connected to the multi handle π¦curl_multi_cleanup(3)should be called when all easy handles are removed π
so it's remove β easy cleanup β multi cleanup. in that order. don't freestyle it, it's not that kind of party π
Also!! Passing in aNULLpointer in multi_handle will make this function returnCURLM_BAD_HANDLEimmediately with no other action. Like it sees NULL and it's just "nope, not today" and returns. no other action. periodt. π
π RETURN VALUE π
It returns a CURLMcode type, which is the general libcurl multi interface error code. On success, CURLM_OK is returned. slay β
β SEE ALSO β
go read those too, iykyk π₯
and that's the page, bestie!! π this little baddie comes to you from libcurl 7.9.5, dated 1 March 2002, and it lives its best life as gnurl_multi_cleanup(3) β mwah, take care, hydrate, and clean up your handles in the right order πβ¨π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms