title: StringBuilder - Reset or create a new
body: <p>I have a condition that a StringBuilder keeps storing lines matching a pattern from a large flat file (100's of MB). However after reaching a condition I write the content of the StringBuilder varialble to a textfile. </p>
  
  <p>Now I wonder if I should use the same variable by resetting the object ->  </p>
  
  <pre><code>stringBuilder.delete(0,stringBuilder.length())
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>stringBuilder=new StringBuilder();
  </code></pre>
  
  <p>Please suggest which would do you think is better as far as both performance and OOM issues are concerned.</p>