From 2b2accb8bf574bfb7d85893696f477d5bc6ca272 Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Sat, 21 Aug 2010 15:47:10 +0200 Subject: Added calls to zmq_msg_close in examples --- doc/zmq_recv.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') 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); ---- -- cgit v1.2.3