Possible memory leak? Issue with changing scenes

Those models are quite large - 12MB each, and even the scene editor was struggling on my laptop (8GB ram).

From this link, it’s hard sounds like it’s difficult to multiple sprites that exceed a size of 2000x2000 (around 15MB).

Given you’ve got around 30 of these 12MB models in the scene, you may be expecting too much and pushing the limits of GDevelop.

But I’m speculating. Someone with better knowledge of GDevelop internals may be able to give a more definitive answer.

1 Like

Yes, the thing is, the same problem would happen if you used lots of 1-5mb models as well. The size of individual model doesnt seem to matter much, only how many mb’s of models gets loaded into memory. So it menas if you have a really big 3d game, with like 30 levels, even if all your models are 1-5mb, you will eventually hit this problem as well.

It is clear to me it is some limittaion with the engine, yeah. There is just a hard memory limit of what can be loaded, and the engine does not do a good job cleaning its resources between scene loads. It seems like something that could be fixed, I dont know. I hope someone that works on engine will look into it at some point. I know they have reworked memory management a few times now.

1 Like

Would still really like some help with this…

If I remove all events and extensions the problem still happens, as seen in the example project I provided in this thread

from my point of view it could be you’ve reached the maximum polygons limit of GD…
even some dedicated software (…like blender) struggle at loading bigger model with lots of polygons…and ofc it doesn’t means that it leaks memory…

bigger in terms of polygons doesn’t necessarily means bigger in terms of Bytes size…

various factors have to be taken into count:…textures…efficient UV mapping…and better normal maps can reduce polygon count without sacrificing visual quality…

anyway… imo it could be that you’re pushing GD polygons and texs capacity to its limits…indipendently from the bytes size of your models…

and if you ask me…many times i had in mind (for example) to turm my player character into a 3D object …but knowing the power of the engine…i’ve never been confident at doing it…

edit:and about using model or not into the scene imo doesn’t mean they’re not stored anyway to be reused…
eg even blender have a scene manager …but even if you don’t use or hide your model between scenes…the overall size doesn’t change …
and i’m not totally sure but i guess the same happens in other engines like unity…and unreal for example…
…they’re just more fitted for 3D projects…for various reasons…

…and “animate” polygons require a huge quantity of horsepower