CZMQ appears quite explicit about ownership of objects. For example:
zmsg_send
will destroy the message when sent. This includes destroying any frames that are owned by thezmsg_t
.- Calling
zmsg_add
means that thezmsg_t
takes ownership of thezframe_t
.
I was thinking about making this "ownership" concept an explicit state in the ruby wrappers. So:
zmq_message_wrapper
would have a flag for "owning the message", which would be cleared when we send the message.