The ccpreference notes for std::shared_ptr<T>::use_count
has a note about comparision with 1
that I don't quite understand.
In multithreaded environment, this does not imply that the object is safe to modify because accesses to the managed object by former shared owners may not have completed, and because new shared owners may be introduced concurrently, such as by
std::weak_ptr::lock
.
I don't understand the implications of accesses to the managed object by former shared owners may not have completed
. What does this mean? How can a former shared owner access the underlying object if it doesn't actually hold a shared reference anymore?