赫昂 为什么要智能指针:为了便于堆内存管理,防止内存泄漏/重复释放 头文件:<memory> 智能指针本质上是模板类 C++11 引入了 3 个智能指针类型 1. std::unique_ptr<T> 2. std::shared_ptr<T> 3. std::weak_ptr<T>