zmq_msg_close.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. zmq_msg_close(3)
  2. ================
  3. NAME
  4. ----
  5. zmq_msg_close - release 0MQ message
  6. SYNOPSIS
  7. --------
  8. *int zmq_msg_close (zmq_msg_t '*msg');*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_msg_close()_ function shall inform the 0MQ infrastructure that any
  12. resources associated with the message object referenced by 'msg' are no longer
  13. required and may be released. Actual release of resources associated with the
  14. message object shall be postponed by 0MQ until all users of the message or
  15. underlying data buffer have indicated it is no longer required.
  16. Applications should ensure that _zmq_msg_close()_ is called once a message is
  17. no longer required, otherwise memory leaks may occur. Note that this is NOT
  18. necessary after a successful _zmq_msg_send()_.
  19. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the
  20. _zmq_msg_ family of functions.
  21. RETURN VALUE
  22. ------------
  23. The _zmq_msg_close()_ function shall return zero if successful. Otherwise
  24. it shall return `-1` and set 'errno' to one of the values defined below.
  25. ERRORS
  26. ------
  27. *EFAULT*::
  28. Invalid message.
  29. SEE ALSO
  30. --------
  31. linkzmq:zmq_msg_init[3]
  32. linkzmq:zmq_msg_init_size[3]
  33. linkzmq:zmq_msg_init_buffer[3]
  34. linkzmq:zmq_msg_init_data[3]
  35. linkzmq:zmq_msg_data[3]
  36. linkzmq:zmq_msg_size[3]
  37. linkzmq:zmq[7]
  38. AUTHORS
  39. -------
  40. This page was written by the 0MQ community. To make a change please
  41. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.