4 ms·
A Proposal for the World’s Dumbest Smart Pointer (2014)
- makecheck 11y agoIs 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.