ams-tschoening commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1004721218


   > To copy a shared_ptr the reference count must be incremented, for which a 
lock must be acquired.
   
   The link Robert provided tells the exact opposite:
   
   > The cost concern is nowadays moot thanks to return value optimization 
(RVO), so you won't incur a increment-increment-decrement sequence or something 
like that in modern compilers. So the best way to return a shared_ptr is to 
simply return by value:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to