Hmm. In that case, I may have just discovered the one and only time it
makes sense to dynamically allocate a smart pointer. Sending the resulting
raw pointer over inproc would certainly be safe, and memory management
semantics with guaranteed-deletion could be arranged.


On Wed, Feb 5, 2014 at 3:38 PM, Pieter Hintjens <[email protected]> wrote:

> On Wed, Feb 5, 2014 at 9:32 PM, Lindley French <[email protected]> wrote:
>
> > 1) Messages will not be moved around with C-style memcpy, etc. I don't
> know
> > how weak_ptr (or shared_ptr) would react to this, but it's a bad idea in
> > general. It can break vtables and stuff like that. I recall reading that
> > inproc doesn't do any copying, but is this an API guarantee or just an
> > implementation detail?
>
> Inproc certainly may copy message contents on sending. It depends on
> the API call you use, and I don't think there's a zero-copy receive
> call at all.
>
> > 2) Messages will not be dropped silently. I think PAIR and PUSH/PULL meet
> > this requirement. Please confirm----there is NO WAY for these types to
> drop
> > messages, correct?
>
> This is correct, over inproc. Over TCP messages may be lost when
> underlying connections are broken unexpectedly.
>
> -Pieter
> _______________________________________________
> 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