Is there a non-atomic equivalent of std::shared_ptr? And why isn't there one in ?

前端 未结 5 1694
闹比i
闹比i 2020-11-27 14:30

This is a bit of a two part question, all about the atomicity of std::shared_ptr:

1. As far as I can tell, std::shared_ptr

5条回答
  •  野性不改
    2020-11-27 15:01

    Boost provides a shared_ptr that's non-atomic. It's called local_shared_ptr, and can be found in the smart pointers library of boost.

提交回复
热议问题