Suppose I have:
// MyClass.h
class MyClass
{
public:
MyClass();
private:
Something *something_;
}
// MyClass.cpp
MyClass::MyClass()
{
something_ = new Something();
}
Should I initialize something_ to NULL (or 0) in the constructor initialization list of the MyClass constructor? Or is that not necessary because I'm assigning to it in the body of the constructor? What is the recommended practice?