I\'m currently designing a object structure for a game, and the most natural organization in my case became a tree. Being a great fan of smart pointers I use shared_pt
shared_pt
From the Boost 1.42 source code ( line 155):
shared_ptr lock() const // never throws { return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); }
ergo, James McNellis's comment is correct; it's the cost of copy-constructing a shared_ptr.
shared_ptr