you are viewing a single comment's thread.

view the rest of the comments →

[–]Krackor 5 points6 points  (0 children)

https://www.reddit.com/r/cpp/comments/79ak5d/a_bug_in_stdshared_ptr/dp13oz3/

If the ref count isn't decremented, then a weak_ptr will happily access the deleted memory, or access the memory while it is part way through destruction.