智能指针:告别内存泄漏的利器----《Hello C++ Wrold!》(27)--(C/C++)
文章目录
前言
智能指针的作用
智能指针的实现和原理
库里面的智能指针
std::auto_ptr
auto_ptr的模拟实现
std::unique_ptr
unique_ptr的模拟实现
std::shared_ptr
shared_ptr的模拟实现
shared_ptr的一个弊端
std::weak_ptr
weak_ptr的模拟实现

