On Mon, Mar 11, 2013 at 12:39 AM, Mohit Jaggi <[email protected]> wrote:
> I understand, but the caller does not control if the message is stored in > VSM or on heap(since choice is made inside zmq code). So zmq has to somehow > copy the VSM before the message variable goes out of scope. Just want to > confirm that zmq does that. > Or is it not OK to use zmq_msg_t on stack and it should always be allocated > on heap? You're over-thinking it. The VSM data is just a property of zmq_msg_t like size and has the same scope / lifetime as the message object. You can use either stack or heap depending on your use case. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
