iOS Memory keeps increasing at start screen

Hi,

I tried compiling duang sheep example to iOS and run it on physical device, left it at start scene then observer memory in xCode. Memory usage keeps increasing dramatically for a while till it comes to stable state, is this normal ?

@trungnt85 I also noticed such behaviour in any cocos creator project. Invoking garbage collect manually would halt the constant incremental.

However either way it does not critically affect the overall performance.

Yes, manually call GC will result in main thread paused. I did noticed this problem at Cocos Creator 1.3.1 then it’s fixed on 1.3.2. Now it appears again on 1.4

@nite, @slackmoehrle, @zhangbin

Do you guys have any ideas about this issue. I’m trying to debugging memory leaks within my game, there absolutely something wrong in my code but should I worry about this

Are you sure you have memory leaks? Unless you run into some issues I wouldn’t worry about having memory constantly increasing. Some system memory managers have pretty sophisticated release strategies and they won’t bother taking free memory back from the proccess unless memory is scarce (due to fragmentation reasons I guess).

I’m pretty sure about that. I tested switching back and forth 2 scene : Main Scene and Login Scene, no heavy task implemented there, memory keep increasing. My game started at 120mb then after switching a while, about 30 times, memory usage is 220 Mb

I did another round of observance on one of my game running on v1.4.0 cocos creator. The memory usage climbed steadily from 580MB to 610MB and eventually dropped back to 580MB. I would say this incremental behaviour is safe and probably due to the JSB garbage collection strategy.

You could have leakages resulted from objects/targets that wasn’t handled properly. Be careful on these few things:

Also try comparing your project to an empty project memory behaviour.