document support for NULL free function in zmq_msg_init_data

Description

The zmq_msg_init_data API function has a zmq_free_fn argument that is a pointer to a function to free the data. It would be good to document and officially support the feature (ALREADY IMPLEMENTED in the source code) that passing NULL for this argument is allowed and simply means that no free function is called.

I checked the source code for both version 2.2.0 and 3.2.3, and NULL free-function arguments are supported in both.

Environment

None

Activity

Show:

Guido G. August 29, 2013 at 9:38 AM

Current man page says:
"...
If provided, the deallocation function ffn shall be called once the data buffer is no longer required by 0MQ,
with the data and hint arguments supplied to zmq_msg_init_data().
..."

The "If provided" is the key.
But you might come up with a better solution.

Details

Assignee

Reporter

Components

Priority

Created July 23, 2013 at 3:33 PM
Updated August 29, 2013 at 9:38 AM