curl_url_cleanup(3)
π curl_url_cleanup(3) β free the URL handle π
okay so bestie, welcome to the Library Functions Manual corner where curl_url_cleanup(3) is the main character. it's giving free the URL handle, and honestly? obsessed. π
πΈ NAME πΈ
curl_url_cleanup β free the URL handle π«Ά
β¨ SYNOPSIS β¨
#include <curl/curl.h>
void curl_url_cleanup(CURLU *handle);
that's the whole signature, bestie. the argument is CURLU *handle. that's it. π
π§ DESCRIPTION π§
okay so what does it do? it frees all the resources associated with the given CURLU handle. all of them. the handle gets its cleanup moment, periodt. π
Passing in a NULL pointer in handle makes this function return immediately with no action. like, it literally just vibes back out β no cleanup, no drama. π
and listen closely: any use of the handle after this function has been called and has returned is illegal. not "oops bestie" illegal β illegal. After cleanup returns, do not touch that handle. π
π PROTOCOLS π
This functionality affects all supported protocols. all of them, bestie. no cap. π
π§ EXAMPLE π§
here's the little demo, exactly as it should be:
int main(void)
{
CURLU *url = curl_url();
curl_url_set(url, CURLUPART_URL, "https://example.com", 0);
curl_url_cleanup(url);
}
see? it makes a CURLU with curl_url(), sets the URL part with curl_url_set(url, CURLUPART_URL, "https://example.com", 0), then calls curl_url_cleanup(url). clean, cute, iconic. π
π¦ AVAILABILITY π¦
Added in curl 7.62.0. that's the origin story, bestie. π«Ά
π RETURN VALUE π
none. literally none. that's the entire return value section. no cap. π
π SEE ALSO π
go give these other pages some love, iykyk:
mwah π β this page is from libcurl, dated 2026-10-12. curl_url_cleanup(3) out! π«Ά
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms