Games closes when multitasking

Discussion in 'iOS Programming' started by CutControl, Oct 17, 2011.

  1. CutControl macrumors newbie

    Oct 17, 2011
    Hello. I have this problem:

    I made a game for the iPad with ~110mb RAM footprint.
    • I launch the game
    • Switch into another application, say safari with tabs opened or a different game
    • Switch back to my game
    • The game restart as if just first started it

    My guess: IOS runs out of ram and forces my game to close in the background.

    Question: Is there something that can be done about it? Any help is greatly appreciated. :(

    ps I tried google, but couldnt get the right key words
  2. jnoxx macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    Save the state, but remove the used resources, and force a PAUSED screen on it when you come back, and load the sources back in when they press resume, just a wild guess..
  3. CutControl thread starter macrumors newbie

    Oct 17, 2011
    Not a bad idea. I will consider that for a future project. TYVM :)
    But this one has to be released real soon.
    I was mostly wondering if this is normal for ios or not.
    Tried Cut the Rope and some others and found that they can be unloaded like this too. So I guess I'll have to leave like this and work on ram footprint.
  4. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    I think you're better off putting your efforts into saving the state of your app.
  5. robbieduncan Moderator emeritus


    Jul 24, 2002
    I absolutely agree. Unless an apps RAM footprint is zero bytes iOS might remove it from memory.
  6. CutControl thread starter macrumors newbie

    Oct 17, 2011
    Well yeah, that too :)
    Thanks guys. Somehow I never thought of save states.

Share This Page