Another, more complicated way, would be to implement a mark&sweep
garbage collector of sorts: instead of freeing the buffer, the callback
you register with zmq_msg_init_data would mark the buffer as done (in a
thread safe way!). Then your application's garbage collector can sweep
it.

It would be nice, if I could pass over a copy  of (not reference or pointer to) a 
shared_ptr that owns the buffer, but with the call back and the "void * hint" 
this wasn't possible for me.

--
Distributed Systems Research Group
Stephan Opfer  T. +49 561 804-6280  F. +49 561 804-6277
Univ. Kassel,  FB 16,  Wilhelmshöher Allee 73,  D-34121 Kassel
WWW: http://www.uni-kassel.de/go/vs_stephan-opfer/
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to