Crash when restarting level out of memory

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.

1 Like

I think if you try this in a packaged game, it should be ok. The editor just doesn’t’ have the same memory maintenance systems running.

Everything is just the opposite. In the editor everything is ok, there are no jumps with memory increase when restarting the level during testing. But in the build there is a memory overload and a crash when the level restarts.

1 Like

Ok, strange…

I am developing for consoles. This problem persists on Xbox, PS, Switch. Increasing the delay before openlevel when using transition empty level kinda helped.