Ram release issue

Many players have encountered this situation:playing a game for about 20-30 minutes and out of nowhere crash to the desktop without any warning or error message.

There are many causes for this problem, but there is one that has never been fixed and can be triggered consistently: the death units fill up Pc’s Ram.

If a unit dies in the game, even though its corpse has disappeared, it’s still there, still has an ID and model, you just can’t see them and your units can pass through, but they actually still lying there, when so many corpses fill up PC’s memory, the game will crash.

The timing of the game crash varies depending on the size of the host’s memory, so some people’s game crash in 20-30 minutes, some in 50-90 minutes. It specifically depends on the number of units that die in the game and the size of the host’s memory.

Also Aoe4 will only release a portion of memory after one match ends, it means last game’s death units still taking up the memory. So even if you have a 64GB Ram, you could also get a game crash in about 30 minutes. The temporary solution I have found so far is restart the game after one match end, so I can free up the memory. But if too many units die in one game, it will still fill up the memory and cause the game to crash.

I’m sure this problem can be solved, because Company of Heroes 2 and Company of Heroes 3 use the same engine as AoE4, but those two games didn’t have memory release issues.

coh2 definitely has a memory leak to this day. its a limitation with their two decade old essence engine. while relic did update it through the years, the underlying issues clearly never got fixed.