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