Jayesh A Lalwani wrote:THe destructor of the smart pointer decrements the reference count. When the reference count hits 0, the object that the pointer points to is deallocatted.
Jeff Verdegan wrote:
When you say "the object of the smart pointer is copied", you mean "the 'real' pointer that is wrapped by the the smart pointer is copied,"
Jayesh A Lalwani wrote:In C++, the object is the TV, and the pointer is the remote.
Jayesh A Lalwani wrote:The complete metaphor is posted Here