curl_share_cleanup.3 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. .\" generated by cd2nroff 0.1 from curl_share_cleanup.md
  2. .TH curl_share_cleanup 3 "2025-01-17" libcurl
  3. .SH NAME
  4. curl_share_cleanup \- close a shared object
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLSHcode curl_share_cleanup(CURLSH *share_handle);
  9. .fi
  10. .SH DESCRIPTION
  11. This function deletes a shared object. The share handle cannot be used anymore
  12. when this function has been called.
  13. Passing in a NULL pointer in \fIshare_handle\fP makes this function return
  14. immediately with no action.
  15. Any use of the \fBshare_handle\fP after this function has been called and have
  16. returned, is illegal.
  17. .SH PROTOCOLS
  18. This functionality affects all supported protocols
  19. .SH EXAMPLE
  20. .nf
  21. int main(void)
  22. {
  23. CURLSHcode sh;
  24. CURLSH *share = curl_share_init();
  25. sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
  26. /* use the share, then ... */
  27. curl_share_cleanup(share);
  28. }
  29. .fi
  30. .SH AVAILABILITY
  31. Added in curl 7.10
  32. .SH RETURN VALUE
  33. CURLSHE_OK (zero) means that the option was set properly, non\-zero means an
  34. error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl\-errors(3)\fP man
  35. page for the full list with descriptions. If an error occurs, then the share
  36. object is not deleted.
  37. .SH SEE ALSO
  38. .BR curl_share_init (3),
  39. .BR curl_share_setopt (3)