Getting a boost::shared_ptr for this

前端 未结 6 2061
有刺的猬
有刺的猬 2020-12-02 07:11

I am making extensive use of boost:shared_ptr in my code. In fact, most of the objects that are allocated on the heap are held by a shared_ptr. Unf

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 07:56

    boost has a solution for this use case, check enable_shared_from_this

提交回复
热议问题