摘要: std::shared_ptr<int> a = std::make_shared<int>(2); std::weak_ptr<int> b = a; a = nullptr; if (std::shared_ptr<int> b_lock = b.lock()) std::cout << *b_ 阅读全文
posted @ 2022-03-08 11:43 strive-sun 阅读(533) 评论(0) 推荐(1)