I’ve been struggling with the Immix garbage collection for several months now. I have my game set up to record inputs, player position, and other such things for a replay system, which is how I discovered the issue. After doing a single run, I can run the replay repeatedly, the only interruption being the title screen and replay selection screen in between replays. However, the longer I send the game through a loop like this, the worse things get: drawing events start to render as giant black boxes, the framerate drops, and eventually, the game crashes with “Memory Exhausted!” printed in the log. I’ve optimized numerous things to use less memory, but I simply can’t figure out how to combat this.
How can I get around and avoid the “Memory Exhausted!” error for the garbage collector?
Please ask questions: I’ve spent a very long time on this problem, and there’s a ton of information on it, but I’m hardly sure where to start.