title: Instantiate class on variable declaration or within constructor
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3105081/where-is-the-proper-place-to-initialize-class-variables-in-as3">Where is the &ldquo;proper&rdquo; place to initialize class variables in AS3</a>  </p>
  </blockquote>
  
  
  
  <p>I was wondering if anyone knows wether its better to instantiate class on it's variable declaration or within a constructor?  For example, this:</p>
  
  <pre><code>protected var _errorHandler:ErrorHandler = new ErrorHandler();
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>protected var _errorHandler:ErrorHandler;
  
  public function someClass() {
  _errorHandler = new ErrorHandler();
  }
  </code></pre>
  
  <p>A small point I think, but I want my code to robust and efficient as possible!</p>
  
  <p>Thanks</p>
  
  <p>Chris</p>