What are potential dangers when using boost::shared_ptr?

后端 未结 13 900
猫巷女王i
猫巷女王i 2020-12-02 07:42

What are some ways you can shoot yourself in the foot when using boost::shared_ptr? In other words, what pitfalls do I have to avoid when I use boost::shared_ptr?

13条回答
  •  执念已碎
    2020-12-02 08:42

    We debug several weeks strange behavior.

    The reason was:
    we passed 'this' to some thread workers instead of 'shared_from_this'.

提交回复
热议问题