move input shared_ptr in atomic_shared_ptr constructor
authorIlya Maykov <ilyam@fb.com>
Fri, 23 Jun 2017 18:32:32 +0000 (11:32 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Jun 2017 18:37:25 +0000 (11:37 -0700)
commita325a1c80ff208a2dc04f3d7d1cd320b88d10069
tree786c8e7e2db3a24f4700a808e9ec61f58978eaaa
parent297d72d1ee6b5b8e70a6f61224f44b275e155bc3
move input shared_ptr in atomic_shared_ptr constructor

Summary: By moving the input shared_ptr instead of copying it, we avoid doing an unnecessary ref count increment + decrement.

Reviewed By: djwatson, yfeldblum

Differential Revision: D5298467

fbshipit-source-id: b9f0b6999278609417bb4dc062030ca2388ba20a
folly/experimental/AtomicSharedPtr.h