gnurl_multi_cleanup(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… 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:

  1. curl_multi_remove_handle(3) before any easy handles are cleaned up πŸŽ€
  2. curl_easy_cleanup(3) can now be called independently since the easy handle is no longer connected to the multi handle πŸ¦‹
  3. 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 a NULL pointer in multi_handle will make this function return CURLM_BAD_HANDLE immediately 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