Structs versus Classes
We compare structs and classes across value semantics, heap layout, and garbage collector behavior, showing how replacing a list of point classes with a list of point structs reduces heap objects count from one million to one and cuts memory usage from 32 MB to 8 MB for the same data.
Previous Module
The .NET Garbage Collector
This Module
Memory Performance Optimizations