智能指针
摘要:重点:四种智能指针及底层实现:auto_ptr、unique_ptr、shared_ptr、weak_ptr std名称空间定义了3种智能指针。 unique_ptr<T> 具有唯一性,不会有多个该指针指向同一地址,该指针不可复制。 创建 必须是直接初始化 可以用传统的new unique_ptr<
阅读全文
posted @ 2022-06-05 11:27
posted @ 2022-06-05 11:27
posted @ 2022-06-01 16:16
posted @ 2022-06-01 11:46
posted @ 2022-03-22 15:27
posted @ 2022-03-15 15:05