curl_share_cleanup(3)

curl_share_cleanup3

Clean up a shared object

Usage

#include <curl/curl.h>
CURLSHcode curl_share_cleanup(CURLSH *share_handle);

Overview

This function deletes a shared object. The share handle cannot be used anymore when this function has been called.

Passing in a NULL pointer in share_handle makes this function return immediately with no action.

Examples

int main(void)
{
  CURLSHcode sh;
  CURLSH *share = curl_share_init();
  sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
  /* use the share, then ... */
  curl_share_cleanup(share);
}

Return value

CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <curl/curl.h> defines. See the libcurl-errors(3) man page for the full list with descriptions. If an error occurs, then the share object is not deleted.

Releases

135 releases since Mac OS X 10.4; the text changed 16 times.

  1. 10.4–10.6.2
  2. 10.6.3–10.6.8
  3. 10.7–10.7.5
  4. 10.8–10.11.6
  5. 10.12–10.12.5
  6. 10.12.6–10.14.6
  7. 10.15–11.5
  8. 12.0.1–12.2
  9. 12.3–12.5
  10. 13.0
  11. 13.1
  12. 13.2
  13. 13.3
  14. 13.4
  15. 13.5–14.1
  16. 14.2–14.4
  17. 14.5–26.5

Availability

Added in 7.10

From curl 166.0.0.0.1 in macOS 26.5. Parsed by carta from the page's man source.