I am trying to understand how C++11 handles strong reference count on control block of a shared pointer. I am comfortable with idea of decreasing it by one whenever destructor is called.
My problem is with incrementing the strong reference count on control block, which is dynamically allocated, during run-time. This looks even more complicated to me in case of multiple run-time contexts.
How a program can find the same strong reference count from a different context?
Edit: My problem was not with implementation of shared_ptr. It was about using it in multi process/thread/context environment.