gnurl_url_cleanup(3)

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

πŸ’… gnurl_url_cleanup(3) β€” the libgnurl manual, bestie edition πŸŽ€

okay so real talk, this page is from the libgnurl Manual and it's about the single most underrated act of self-care in all of C: freeing your CURLU handle when you're done with it. no cap. ✨


🌸 NAME 🌸

curl_url_cleanup β€” free a CURLU handle. that's it. that's the whole job. and she does it flawlessly. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnurl/curl.h>

void curl_url_cleanup(CURLU *handle);

like yes, that's the entire signature. one function, one pointer, zero drama. we love a low-maintenance icon. πŸ’–


✨ DESCRIPTION ✨

Frees all the resources associated with the given CURLU handle!

and when I say all, I mean all, bestie. every last one. the whole vibe gets returned to the universe. 🧚 this is your "okay I'm logging off, goodnight" moment for a URL handle. do it. your valgrind output will thank you. πŸ”₯


🫢 RETURN VALUE 🫢

none β€” she gives you nothing back, and honestly? that's the point. no return value, no expectations, just closure. literally. 😌


πŸ’œ EXAMPLE πŸ’œ

CURLU *url = curl_url();
curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
curl_url_cleanup(url);

see how clean that is?? make it, fill it, free it. the holy trinity of handle hygiene. 🌈 this is the whole lifecycle and it's giving main character energy from start to finish. πŸŽ€


⭐ AVAILABILITY ⭐

Added in curl 7.62.0 β€” so if you're on anything older, sorry babe, this one's not for you yet. πŸ™ˆ


πŸ’€ SEE ALSO πŸ’€

the whole friend group, fr fr. go read them, iykyk. πŸ‘‘


okay bye ily, this page was brought to you by libcurl, dated 6 Aug 2018, and filed under gnurl_url_cleanup(3) β€” now go free that handle. mwah. πŸ’…πŸ’–πŸŒΈ

πŸ“¦ where this page comes from