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 00:16:15 UTC

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

swebb2066 commented on pull request #96:
URL: https://github.com/apache/logging-log4cxx/pull/96#issuecomment-1004441759


   To copy a shared_ptr the reference count must be incremented, for which a lock must be acquired.
   
   By returning a const reference, the caller can decide whether to copy the shared_ptr. The compiler will complain when the const reference is passed to a function requiring a non-const reference.


-- 
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