[zeromq-dev] zmq_msg_init_data with zero deallocation function

Ilja Golshtein ilejncs at narod.ru
Wed May 11 15:38:50 CEST 2011


Hello!

According to zmq_msg_init_data manual
==
       int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint);
==
ffn is optional ("If provided, the deallocation function ffn shall be called once the data buffer is no longer required by 0MQ").

How does the thing work if ffn is not provided?

Is the code
==
zmq_msg_t msg;
zmq_msg_init_data (&msg, (void *)"something", 9,  NULL, NULL);
==
valid?

Thanks.


-- 
Best regards,
Ilja Golshtein.



More information about the zeromq-dev mailing list