[bind10-dev] Shared pointers, references and guideline

Michal 'vorner' Vaner michal.vaner at nic.cz
Wed May 29 12:26:16 UTC 2013


Hello

I thought there was a guideline to pass shared pointers as:

  void function(const shared_ptr<Data>& data)

instead

  void function(shared_ptr<Data> data)

if possible. The reason is, of course, performance, because we measured we spend
several percent of run time creating and destroying shared pointers.

But when I looked today, I didn't find the recommendation in the guidelines.
Should we update it?

With regards

-- 
I've already told you more than I know.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130529/bd57e851/attachment.bin>


More information about the bind10-dev mailing list