title: C# Does Lambda => generate garbage?
body: <p>Does using a lambda expression generate garbage for the GC opposed to the normal foreach loop?</p>
  
  <pre><code>// Lambda version
  Foos.ForEach(f=&gt;f.Update(gameTime));
  
  // Normal approach:
  foreach (Foo f in Foos)
  {
    f.Update(gameTime);
  }
  </code></pre>
  
  <p>The CLR profiler shows that I have 69.9% system.Action&lt; T > and I suspect that being the lamba version of the foreach loop as above. Is that true?</p>
  
  <p>EDIT: I used the Microsoft CLR profiler: <a href="http://download.microsoft.com/download/4/4/2/442d67c7-a1c1-4884-9715-803a7b485b82/clr%20profiler.exe" rel="noreferrer">http://download.microsoft.com/download/4/4/2/442d67c7-a1c1-4884-9715-803a7b485b82/clr%20profiler.exe</a>
  or <a href="http://msdn.microsoft.com/en-us/library/ff650691.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ff650691.aspx</a></p>