2012/1/9 Marten Feldtmann <[email protected]>: > "The zmq_msg_close() function shall inform the ØMQ infrastructure that > any resources associated with the message object referenced by msg are > no longer required and may be released. Actual release of resources > associated with the message object shall be postponed by ØMQ until all > users of the message or underlying data buffer have indicated it is no > longer required." > > I interpret it, that 0MQ still may reference this structure (located at > message), but after finishing this function, the address of the > structure may be not available any more .... therefore it may be > overwritten.
In case of normal messages (*), zmq_msg_t stores just a pointer to a reference-counted shared message buffer. (*) by "normal" I mean larger than 29 bytes (see max_vsm_size in src/msg.hpp) In case of VSM (very small messages), zmq_msg_t stores the data inside, and it is copied around, not reference-counted. See src/msg.hpp and src/msg.hpp, in particular zmq::msg_t::close (). Use the source, Luke! :) _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
