3 ms·
C# has value types and many things are value types but certain things are not. Core library interfaces are implemented as with Object enumerator types for exam
by jayd16 7y ago
C# has value types and many things are value types but certain things are not. Core library interfaces are implemented as with Object enumerator types for example. This causes IList.GetEnumerator() to return a boxed type.
Its smart enough to use the value type when it knows it can though, such as List.GetEnumerator().
Lambdas have some allocations. I like LINQ but it can have some allocation as well.
These are all tiny allocations but in a game you'd like to strive for 0 allocations.