summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Hintjens <ph@imatix.com>2010-08-21 15:47:10 +0200
committerPieter Hintjens <ph@imatix.com>2010-08-21 15:47:10 +0200
commit2b2accb8bf574bfb7d85893696f477d5bc6ca272 (patch)
tree01e0e04db31d7975df3000745e0a135c4e928c3e
parentc52d1f2d47ac93e391ff707b50245aa33d7e8323 (diff)
Added calls to zmq_msg_close in examples
-rw-r--r--doc/zmq_recv.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt
index e050879..326d78c 100644
--- a/doc/zmq_recv.txt
+++ b/doc/zmq_recv.txt
@@ -78,6 +78,8 @@ assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);
+/* Release message */
+zmq_msg_close (&msg);
----
.Receiving a multi-part message
@@ -95,6 +97,7 @@ do {
/* Determine if more message parts are to follow */
rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
assert (rc == 0);
+ zmq_msg_close (&part);
} while (more);
----