Finnhu
全职 · 300/日  ·  6525/月
工作时间: 工作地点: 远程
服务企业: 0家累计提交: 0工时
聊一聊

APP聊一聊

个人介绍

我是程序员


Use reset to change the stored  owned by the unique_ptr to ptr and then delete the original stored pointer. If the unique_ptr wasn't empty, reset invokes the deleter function returned by  on the original stored pointer.

Because reset first stores the new pointer ptr, and then deletes the original stored pointer, it's possible for reset to immediately delete ptr if it's the same as the original stored pointer.

工作经历

  • 2022-09-05 -2024-10-16郑州工业项目总监

    // stl_release_unique.cpp // Compile by using: cl /W4 /EHsc stl_release_unique.cpp #include #include struct Sample { int content_; Sample(int content) : content_(content) { std::cout

教育经历

  • 2023-10-09 - 2024-10-22河南科技大学软件工程本科

技能

Java掌握
0
1
2
3
4
5
更新于: 2024-10-22 浏览: 105