Search code examples
iosobjective-cmemory-managementcocos2d-iphone

constant app memory increase ( IOAccelResource )


I am trying to wrap my mind around an issue (eluded to in this question). The context is: turn-based game, developed with cocos2d version 2.0, obj-c, no ARC, currently prepping an AppStore update to account for some iOS 7 issues (mine, not iOS7).

My own instrumentation, as well as Instruments, show no leaks, no abandoned memory, nothing... flat. This also used to be the case under iOS 4,5,6.1. However, in my test rundown prior to submission, when profiling on device, i see a 1Mb increase per 2 minutes, with the game sitting idle, ie no user interactions whatsoever (see pic below).

enter image description here

The only thing i can see is this IOAccelResource category running amuck between generation capture.

  1. Would you have any suggestions as to what could that be ?

  2. I cant find much about an IOAccelResource ... can anyone of you point me in the right reading direction ? If this is indeed cocos2d related, i would not mind digging in there, but i dont know where to start looking.

  3. Also, i would like to run with 'as close to release' a build as possible, and still be able to measure the memory footprint over time. Could you suggest me a method for measuring process size ?

    tia.


Solution

  • Ricardo has half the answer : zombies objects is part of this. You need both Zombies enabled AND an attached process to get the creep.

    In summary :

    • no zombies, no memory creep.
    • with zombies, no debug process attached, no memory creep.
    • with zombies, debug process attached, memory creep.