Indi
编程沉思录 cyhone.com

C++11 中推出了三种智能指针,unique_ptr、shared_ptr 和 weak_ptr,同时也将 auto_ptr 置为废弃 (deprecated)。 但是在实际的使用过程中,很多人都会有这样的问题: 1. 不知道三种智能指针的具体使用场景 2. 无脑只使用 shared_ptr 3. 认为应该禁用 raw pointer (裸指针,即 Widget * 这…

讨论

还没有评论,来说第一句吧。

编程沉思录 的其他文章