Is this leak expected?

Is this leak expected?
0.0 0


When I load either my personal Cocos2d-x app with Box2d or a new project using a template of Cocos2d-x with Box2d, I get a memory leak showing up with the leak analyzer. Its in thread_start in libSystem.B.dylib.

Is this normal or expected?

I attached a screen shot too.


leaks.png (152.7 KB)


Does it leak only with Box2d?


No it also leaks on a standard Cocos2d-x Template project.

I attached an image of my Cocos2d-x Template project. Looks the same.


There seem to be a bunch of small leaks on Windows as well. The CRT memory debugging routines are helpful to find them.
(see the following url: )

Might be related?

(without Box2D, by the way)


I remember if you disable the fps shwoing, it will not leak on iOS.
On windows, it is about the driver of gles.


Thanks for the response.

Currently I have my app setup like this:


Is this what you mean by disabling fps from showing up?

Even with setDisplayFPS(false), I still get the memory leaks described in my original post. My original post was with setDisplayFPS(false).

Is there anything else that you can think of that would cause this?



Cocos2d-iphone also has the problem, and cocos2d-x is ported from it.
Maybe it is the mistake of cocos2d-iphone. If it is the case, we will try our best to do it.
Maybe it is the mistake of the debugger of XCode.

I’m sorry for the missing of a solution.


Thanks for the fast response again.

Hopefully its a mistake from the XCode debugger since libSystem.B.dylib seems to slowly leak through out the execution of the entire program.

After executing my program for about 4 minutes, I had 12 leaks coming from libSystem.B.dylib

If you guys could look into this that would be greatly appreciated.

I attached a picture of the 12 leaks, its the only part of my application that seems to be leaking.