Memory leak in HelloCpp? (arch linux 64)

Memory leak in HelloCpp? (arch linux 64)
0.0 0


Hi guys, and thanks for this awesome product! It’s really neat to have such a nice API and the portability in one!

I’m quite new to all this, but I’ve built the HelloCpp project in samples and realized it’s eating up my memory:

./HelloCpp &
while true 
  cat /proc/$!/status | grep VmSize
  sleep 5

This outputs:

cocos2d-x debug info [Ready for GLSL
cocos2d-x debug info [Ready for OpenGL 2.0
VmSize:   152384 kB
VmSize:   158148 kB
VmSize:   163444 kB
VmSize:   169508 kB
VmSize:   174940 kB
VmSize:   180356 kB
VmSize:   185484 kB
VmSize:   190856 kB
VmSize:   196132 kB
VmSize:   201408 kB
VmSize:   206864 kB
VmSize:   212292 kB
VmSize:   217912 kB
VmSize:   223512 kB
VmSize:   229268 kB

What’s the cause of this? I’m trying to use Valgrind —tool=massif but can’t really find anything useful.

Using version cocos2d-2.0-x-2.0.3 on:

$ uname -a
Linux kth 3.5.6-1-ARCH #1 SMP PREEMPT Sun Oct 7 19:30:49 CEST 2012 x86_64 GNU/Linux

What could be causing this?

Note that, as mentioned here, I can’t see a any TTF labels, but memory gets eaten even without any TTF labels in my scene.



Thank you.
#1524 is created for it.


Note that there is still a TTF label running: the FPS display.
This may be causing the leak since no such label shows up on the screen. So we should probably fix first.