shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; }
没有析构函数不代表没有析构动作 它会逆序撤销每个类成员, 看看函数boost::detail::sp_pointer_construct()和shared_count的析构函数
[quote=引用 3 楼 a345485527 的回复:] 没有析构函数不代表没有析构动作 它会逆序撤销每个类成员, 看看函数boost::detail::sp_pointer_construct()和shared_count的析构函数
24,854
社区成员
27,343
社区内容
加载中
试试用AI创作助手写篇文章吧