Temporary data serves a short operation or update, not the whole gameplay session. Keep scratch data short-lived: stack memory is released when its function returns, while heap allocations can remain unavailable until garbage collection. Keeping many temporary arrays on the heap can also waste memory between uses. section 6.6 section 3.2.1
Tracking enemy changes
A board can track enemy indices added to or removed from the game during a frame, then use them to update pooled GameObjects. These per-frame changes need not live in persistent game data. Similar scratch data can track recently fired ammunition or dropped and collected pickups. section 6.6
