I got a memory leak after using CCLabelTTF::labelWithString(…).
The leak seems to be in class “CCImage_ios.mm” at line “unsigned char* data = new unsigned char[width * height * 4];”
Something like
if (date){
delete [] data;}
doesn’t work for me.
CCLabelTTF::labelWithString, CCTextAlignmentLeft,“Helvetica”, 18);
~~> No memory leak
So I stepped into the labelWithString function and recognized, that the only difference is the Dimension of the size. So I tested, if the leak will occur in the second function, if I set the CCSizeMake to (0,0) - and it did!
3) CCLabelTTF::labelWithString(“Test”, CCSizeMake(0, 0), CCTextAlignmentLeft,“Helvetica”, 18);
-> memory leak
So, can you reproduce it ???
For me I can fix my leaks by setting a CCSizeMake > 0,0
But in general, it’s a bug?!