std::unique_ptr 对于独占资源(exclusive-ownership resource)使用std::unique_ptr,它禁止和其他智能指针共享对象 使用 与std::shared_ptr只有单个对象形式不同, std::unique_ptr有两种形式, 对于单个对象(std::unique_ptr<T>), 对于数组(std::unique_ptr<T[]>), 对于解引用操作符(operator*和operator->)对于单个对象专有。 std::unique_ptr<...
qilingzhao.com2 min readNo responses yet.