Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Handling memory - Find out how much RAM is free? — Gideros Forum

Handling memory - Find out how much RAM is free?

PaulHPaulH Member
edited October 2013 in Game & application design
I'm reworking the scene management in a game. I originally coded it to load all the scenes in advance in order to change scenes quickly, but that was causing crashes on some devices, evidently due to running out of memory. Changing it to keep only a few scenes loaded eliminates the the crashes, but the delays in switching scenes are frustrating.

What I'd like to do is test the free memory to dynamically determine how many scenes I can safely keep loaded. That way on devices with ample memory the game could continue to load all the scenes in advance and change scenes very quickly.

Is there a way to test the available memory, or something like a try/catch that could be used to attempt to load things in memory without causing a crash if there's not enough available?

PaulH

Comments

Sign In or Register to comment.