title: How does C# manage memory allocated by a new operator inside a loop?
body: <p>For example:</p>
  
  <pre><code>for (i=0;i&lt;10;i++)
  {
     myclass = new myclass();
     // do stuff with myclass
  }
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li>How will all the memory that has been allocated by doing 10 allocations in this case be retrieved? </li>
  <li>What will my memory footprint be at the end of execution?</li>
  <li>With delete functionality in C++, one had more control over this but in this case, for the second iteration, myclass would simply take a new allocation and move on?</li>
  </ol>