ios7 - Should my iOS game free memory at all when it enters background mode? -
there couple of games want mention, show how handle entering background mode:
clash of clans. seems doesn't free memory @ when enters background mode, in fact can open lightweight applications notes , game go on playing without noticeable delay, seems pretty cool me user's perspective.
game of war. game falls loading screen , initialization process starts on 1 time again when runs inmediately after enters background mode, it's restarting game, annoying sometimes.
so, in case of game, has average memory footprint of 25 mb (and it's going less optimisations), know "free much memory possible" stuff recommended in order neighbour on ios platform, considering freeing memory when game enters background mode cause game have "annoying" pause when enters foreground mode...
...should save progress , pause game when entering background mode without freeing memory @ all, or should free much memory possible , load resources 1 time again when entering foreground mode, respective loading pause?
as point out (by giving 2 games examples utilize opposite strategies), there no unique reply question.
i think proper reply can worked out in given case defining utilize cases want app support.
e.g., 1 utilize case, mention, "the user can switch lightweight app , go game without unnecessary waits". (uc1) then, should have list of lightweight apps , reference devices want create sure utilize case satisfied.
on other hand, may want back upwards different utilize case: "the user come point left game, unless app terminated, in case app should nowadays main menu". (uc2)
in first case, not freeing best approach; in sec case, may want minimise chance app terminated while user task (lightweight or not), can go place left, though has wait resources load.
there might cases intermediate approach best, free part of memory, strike balance.
and, of course, create no sense going first utilize case (uc1) if app memory footprint big terminated after switching app on of devices. in such case, might create more sense freeing memory, @ to the lowest degree can spare app load time (vs. resources load time) when go it.
so, in end, depends...
memory ios7 process background
No comments:
Post a Comment