curl_mime_free.3 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .TH curl_mime_free 3 "22 August 2017" "libcurl" "libcurl"
  25. .SH NAME
  26. curl_mime_free - free a previously built mime structure
  27. .SH SYNOPSIS
  28. .nf
  29. #include <curl/curl.h>
  30. void curl_mime_free(curl_mime *mime);
  31. .fi
  32. .SH DESCRIPTION
  33. \fIcurl_mime_free(3)\fP is used to clean up data previously built/appended
  34. with \fIcurl_mime_addpart(3)\fP and other mime-handling functions. This must
  35. be called when the data has been used, which typically means after
  36. \fIcurl_easy_perform(3)\fP has been called.
  37. The handle to free is the one you passed to the \fICURLOPT_MIMEPOST(3)\fP
  38. option: attached sub part mime structures must not be explicitly freed as they
  39. are by the top structure freeing.
  40. \fBmime\fP is the handle as returned from a previous call to
  41. \fIcurl_mime_init(3)\fP and may be NULL.
  42. Passing in a NULL pointer in \fImime\fP will make this function return
  43. immediately with no action.
  44. .SH EXAMPLE
  45. .nf
  46. /* Build the mime message. */
  47. mime = curl_mime_init(curl);
  48. /* ... */
  49. /* Free multipart message. */
  50. curl_mime_free(mime);
  51. .fi
  52. .SH AVAILABILITY
  53. As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0.
  54. .SH RETURN VALUE
  55. None
  56. .SH "SEE ALSO"
  57. .BR curl_mime_init "(3)"