Crash when restarting level out of memory

AndrewFord
Thu, 23 Jan 2025 17:58:55 +0000
Platform & Builds

Hello!
My game has a memory overflow and crash every time I restart a level. When loading the level for the first time it consumes 6GB, if I try to load it again immediately, the memory goes to 8GB+. This happens on different projects. I understand that the engine does not unload memory before loading a new (or the same) level. How can this be fixed? I tried to make a custom openlevel function using an empty level, load it, call garbage collection, delay and load next level through it, but it doesn’t help much.

5 posts - 2 participants