I have a class that has as a private data member a pointer of the same type.
E.g. The class is "ClassA" and has as a member "ClassA* _classA".

I am writing the copy constructor of ClassA, and would like to do a "deep copy"
of data member _classA, e.g.:

ClassA::ClassA(const ClassA& orig)
: _classA(NULL)
if (orig._classA != NULL)
_classA = new ClassA(*(orig._classA));

Is that allowed?

Thanks in advance, chasse