Enginuity
I just recently started reading Enginuity and I'm up to the Smart Pointers part. There is something I don't quite understand. In the copy constructors he has this:
//Constructing with a pointer
CMMPointer(T *o)
{
obj=0;
*this=o;
}
//Constructing with another smart pointer (copy constructor)
CMMPointer(const CMMPointer<T> &p)
{
obj=0;
*this=p;
}
How come he doesn't call the AddRef() method here? When in the =assignment overloads he does.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement