Commit 2b2accb8 authored by Pieter Hintjens's avatar Pieter Hintjens

Added calls to zmq_msg_close in examples

parent c52d1f2d
......@@ -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);
----
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment