c++智能指针:std::unique_ptr , std::shared_ptr , std::weak_ptr
目录为什么需要智能指针?什么是智能指针?智能指针的本质三种智能指针(来自头文件)1.std::unique_ptr2.std::shared_ptr3.std::weak_ptr引用计数(referencecounting)什么是循环引用?为什么需要weak_ptr?什么时候用哪种智能指针?第一性角度再总结一遍:为什么需要智能指针?我们从一个根本问题开始:C++中我们用new创建对象,释放时要用d