Sprite* sprite = Sprite::createWithSpriteFrameName(“hello.png”);
Sequence* s1 = Sequence::create(RotateBy::create(0.5f, 45.0f), NULL);
ActionInterval* a1 = RepeatForever::create(s1);
// Memory leak occur if I comment this line, means I don’t add the sprite into layer
Imagine, if I create a pool with 50 sprites like this, but I’ve just used 30 sprites of them (by adding the sprite to the layer). So that, the 20 sprites remaining will be leak.
Can you help me how to fix it?
Thank you so much!