Garbage Collection
This article explains how Garbage Collection works in Unity, why GC spikes can cause brief frame hitches, and where hidden allocations come from in everyday code, including boxing, string concatenation, LINQ, lambdas, foreach, coroutines, and repeated component lookups. It also shows how to use Unity Profiler and Memory Profiler to find garbage, then reduce it with practical techniques like object pooling, ArrayPool, caching, pre-allocation, and struct-based data, while comparing Incremental GC with Stop-the-World GC and ending with a practical performance checklist.