You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/04 11:14:04 UTC

[GitHub] [logging-log4cxx] ams-tschoening commented on pull request #96: Reduce indirection in Logger and Hiearchy implementations

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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org