1

For deeper details, please see the following link:

Project A Inception - We must go deeper

The short-version is this: I noticed an out-of-control memory allocation scenario when working on my cocos2d game. I backtracked and checked out cocos2d's default projects for 2.0 and 2.1 and they, too, suffer from this unrestrained death-by-tiny-pieces memory allocation scenario.

Digging deep, I find it came down to how CCDirectorIOS and CCGLView handle certain things, but I can't get deeper.

My questions are:

  • What are these 64-byte allocations needed for, if anything?
  • Is there anything that can be done to bind the memory usage?

At this rate I might as well give up on using cocos2d, but it is an evolving medium, so I'm sure that this can be fixed at some level.

Thanks in advance!

Mike Bell
  • 395
  • 1
  • 4
  • 15
  • If they are the same i have been measuring, they are bogus : probable Instruments/LLDB issue. To confirm, build a 'release' version, target a device, and let run. Measure with the 'Monitor' tool of instruments, and monitor your game's real memory requirements. In my case, it went from 1Mb increase per minute to zero. I just published 2 products with that, and nobody complained of a leak at Apple. http://stackoverflow.com/questions/19234526/constant-app-memory-increase-ioaccelresource/19573352#19573352 – YvesLeBorg Oct 24 '13 at 18:08
  • does Apple really check for leaks during approval? – CodeSmile Oct 24 '13 at 19:23
  • héhéhé ... maybe it is 'brand leak' they are looking for :) – YvesLeBorg Oct 24 '13 at 21:08

1 Answers1

0

Earlier I was redirected to a series of forum posts starting here.

Long story short, there is a bug with cocos2d and the iOS 7 simulator. I tested on older simulators, as well as on hardware, and did not experience the memory allocation problems.

Mike Bell
  • 395
  • 1
  • 4
  • 15