Fully thread-safe shared_ptr implementation

后端 未结 9 1447
面向向阳花
面向向阳花 2021-02-02 17:02

Does anybody know of a fully thread-safe shared_ptr implementation? E.g. boost implementation of shared_ptr is thread-safe for the targets (refcounting

9条回答
  •  伪装坚强ぢ
    2021-02-02 17:40

    In my opinion, the easiest solution is to use an intrusive_ptr with a few minor (but necessary) modifications.

    I shared my implementation below:

    http://www.philten.com/boost-smartptr-mt/

提交回复
热议问题