shared_ptr使用场景、陷阱、性能分析,使用建议

1.std::shared_ptr使用场景 #include <iostream> #include <memory> using namespace std; shared_ptr<int> create0(int value) { return make_shared<int>(value); // 返回一个shared_ptr } //void myfunc(int valu
相关文章
相关标签/搜索