摘要: shared_ptr 不能这样用 int *p1=new int; std::shared_ptr<int> p2 (p1); std::shared_ptr<int> p3 (p1); 问题在于引用计数混乱,不是同一个 sharing group ,指向同一个对象 可以这样用 std::share 阅读全文
posted @ 2019-08-19 10:59 Asele 阅读(554) 评论(0) 推荐(0)