title: Is it bad form to let C# garbage collect a list instead of reusing it?
body: <p>I have a list of elements that steadily grows, until I dump all the data from that list into a file. I then want to reuse that list for the same purpose again. Is it bad practice to simply assign it to a new list, instead of removing all the elements from the list? It seems garbage collection should take care of the old list, and that way I don't have to worry about removing the elements.</p>
  
  <p>For example:</p>
  
  <pre><code>var myList = new List&lt;element&gt;();
  myList.Add(someElement);
  myList.Add(anotherElement);
  // dumps the elements into a file
  
  myList = new List&lt;element&gt;();
  </code></pre>
  
  <p>Edit: Even if there are easy ways around this, I was wondering too about the philosophical side of it. Is it bad to let something be garbage collected if there is a way around it? What are the costs of allowing garbage collection vs deleting the elements and reusing the same memory?</p>