1. shared_ptr<char> k After shared_ptr<char> k(new char[100]) Reference count is not stored in the shared_ptr object, but along with the memory allocated on the heap. Memory allocated on heap Reference count (1)
2. shared_ptr<char> k After m_locator = k ( note reference count is 2 ) shared_ptr<char> k Memory allocated on heap Reference count (2)
3. shared_ptr<char> k After k goes out of scope (note reference count is 1) when k goes out of scope shared_ptr<char> k Memory allocated on heap Reference count (1)