[zeromq-dev] question about czmq zctx_destroy
KIU Shueng Chuan
nixchuan at gmail.com
Thu Apr 18 21:19:06 CEST 2013
I think even if a method has taken ownership, it should still be legitimate
for the programmer to hold on to the reference till the end of the life
cycle of the object.
Eg, zctx manages destruction of sockets, but we still hold a reference to
the socket.
On Apr 18, 2013 11:33 PM, "Pieter Hintjens" <ph at imatix.com> wrote:
> On Thu, Apr 18, 2013 at 5:17 PM, Evan Gates <evan.gates at gmail.com> wrote:
>
> > Out of curiosity, why don't calls that take ownership also nullify a
> > reference?
>
> It would be nicer if they did this but it didn't occur to me. :-)
>
> I've added this language to CLASS, our style guide:
>
> "A method may take ownership of an object instance and then act as a
> destructor of the object instance at some later stage. In that case
> the method SHALL use the same style as the destructor."
>
> I don't like breaking APIs but this seems like a good improvement to
> the CZMQ API so if you want to make those changes, go for it.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130419/46c0e112/attachment.htm>
More information about the zeromq-dev
mailing list