摘要: std::weak_ptr weak_ptr源码链接 (与shared_ptr在同个.h文件) 定义于头文件 <memory> template< class T > class weak_ptr; (C++11 起) std::weak_ptr 是一种智能指针,它对被 std::shared_pt 阅读全文
posted @ 2022-07-31 22:25 正在写bug呢 阅读(114) 评论(0) 推荐(0)
摘要: std::shared_ptr shared_ptr源码链接 定义于头文件 <memory>: template<class T> class shared_ptr; std::shared_ptr 是通过指针保持对象共享所有权的智能指针。多个 shared_ptr 对象可占有同一对象。下列情况之一 阅读全文
posted @ 2022-07-26 17:47 正在写bug呢 阅读(496) 评论(0) 推荐(0)