5 ms·
Is this not a good application of std::weak_ptr<>? Typically if you're observing a value, you also want safety against dangling references. If the owner destr
by makecheck 11y ago
Is this not a good application of std::weak_ptr<>?
Typically if you're observing a value, you also want safety against dangling references. If the owner destroys the object, your copy of the pointer should be cleared out so that you can't accidentally look at the original.