$ ./guess_the_languageGame Dev
Game Dev · hard · #108

What commonly triggers garbage-collection hitches?

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