摘要: 1、unique_ptr //1、使用unique_ptr来管理动态内存,只要unique_ptr指针创建成功,其析构函数都会被调用,无需手动释放。 //2、创建一个unique_ptr实例 unique_ptr<int> pInt(new int(5)); cout << *pInt; //3、移 阅读全文
posted @ 2020-04-24 15:25 玥茹苟 阅读(1696) 评论(0) 推荐(0) 编辑