Code has been added to clipboard!
Using std::weak_ptr Smart Pointer
Example
std::shared_ptr<char> p_shared = std::make_shared<char>(15);
std::weak_ptr<char> p_weak1(p_shared);
std::weak_ptr<char> p_weak2(p_weak1);
Code has been added to clipboard!
std::shared_ptr<char> p_shared = std::make_shared<char>(15);
std::weak_ptr<char> p_weak1(p_shared);
std::weak_ptr<char> p_weak2(p_weak1);