I\'ve been thinking about using shared pointers, and I know how to implement one myself--Don\'t want to do it, so I\'m trying std::tr1::shared_ptr,and I have co
If you want to see all the gory details, you can have a look at the boost shared_ptr implementation:
https://github.com/boostorg/smart_ptr
The reference counting seems to usually be implemented with a counter and platform specific atomic increment/decrement instructions or explicit locking with a mutex (see the atomic_count_*.hpp files in the detail namespace).