title: Magento: creating new instances of a helper class each time a loop runs?
body: <p>I created a custom helper class module which I'm calling thusly:</p>
  
  <pre><code>$bench = Mage::helper('benchmark');
  // ... do stuff ...
  $bench-&gt;addBenchmark();
  // ... more stuff ...
  $bench-&gt;logResults();
  </code></pre>
  
  <p>This outputs the results of time benchmarks in an array. </p>
  
  <p>The class is really simple, it basically just adds the current <code>microtime()</code> to an array then spits that array out when <code>logResults()</code> is called.</p>
  
  <p>The problem is, I have a loop where I'm calling the code above, but instead of logging a "fresh" set of benchmark figures each loop, it's compounding itself and adding to the existing benchmarks array!</p>
  
  <p>I want it to create a new set of benchmarks each time <code>Mage::helper('benchmark');</code> is called.</p>
  
  <p>Any help is appreciated.</p>