title: Best practice for class member initialization
body: <p>Say I have a class Foo:</p>
  
  <pre><code>class Foo
  {
  public:
      Foo();
      ~Foo();
  
  private:
      Bar* mBar;
  }
  </code></pre>
  
  <p>And assume that 'Bar' is a class with a few members that need initializing.  What is the best practice to use when initializing that member? </p>
  
  <p>Example 1:  Do everything in Foos constructor:</p>
  
  <pre><code>Foo::Foo()
  {
      mBar = new Bar("some", "required", "members");
  }   
  </code></pre>
  
  <p>Example 2:  Create a separate initialize function:</p>
  
  <pre><code>Foo::Foo()
  {
  }
  
  Foo::Initialize()
  {
      mBar = new Bar("some", "required", "members");
  }
  </code></pre>
  
  <p>Example 3:  Two part initialization, assuming 'Bar' also has a set method</p>
  
  <pre><code>Foo::Foo
  {
      mBar = new Bar();
  }
  
  Foo::Initialize()
  {
      mBar-&gt;SetMembers("some", "required", "members");
  }
  </code></pre>