What commonly triggers garbage-collection hitches?
// GC spikes cause frame hitches
- Per-frame heap allocations
- Reusing a cached array
- Using struct value types
- Batching all draw calls
Allocating managed memory every frame builds garbage that the GC must collect.
Play Game Dev ▸