title: Every iteration of every “foreach” loop generated 24 Bytes of garbage memory?
body: <p>My friend works with Unity3D on C#. And he told me specifically:</p>
  
  <blockquote>
    <p>Every iteration of every “foreach” loop generated 24 Bytes of garbage
    memory.</p>
  </blockquote>
  
  <p>And I also see this information <a href="http://www.gamasutra.com/blogs/AmirFassihi/20130828/199134/0__60_fps_in_14_days_What_we_learned_trying_to_optimize_our_game_using_Unity3D.php" rel="noreferrer">here</a> </p>
  
  <p>But is this true? </p>
  
  <p>The paragraph most relevant to my question:</p>
  
  <blockquote>
    <p>Replace the “foreach” loops with simple “for” loops. For some reason,
    every iteration of every “foreach” loop generated 24 Bytes of garbage
    memory. A simple loop iterating 10 times left 240 Bytes of memory
    ready to be collected which was just unacceptable</p>
  </blockquote>