Nishant,
zmq_msg_close tells 0MQ to free it up though not necessarily at the point
zmq_msg_close is called.

in the snippet below you'll have to call delete afterwards on 'message' if
you no longer need it.

Also 'data' isnt safe to use after zmq_msg_close is called.

Jon

On 10 April 2013 18:31, Nishant Mittal <[email protected]> wrote:

> when i do..
>
> *zmq_msg_t *message = new zmq_msg_t();*
> *zmq_msg_init (message);*
> *int size = zmq_msg_recv (message, skt, 0);*
> *
> *
> *char *data = (char *) zmq_msg_data (message);
> *
> *
> *
> *zmq_msg_close (message);
> *
>
> do I have to free memory pointed by "data" or the zmq_msg_close will clean
> it up?
>
> thanks
> Nishant
>
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to