After many studies, I came to some conclusions:
Firstly, it takes time to load frames in real time (when starting an animation), and in the case of large images (iPad) it sometimes freezes the scene.
So, in some cases, you MUST load the images in the cache with the init method to avoid this, because you have no other way, and therefore we have the cache anyway:
[[CCTextureCache sharedTextureCache] addImage:@"the_heavy_image.png"];
and if this animation happens often, you donβt want to clear it from the cache.
Other things should be removed from the cache if you are not using it.
[[CCTextureCache sharedTextureCache] removeUnusedTextures];
clears cache only sprites that have already been removed from the screen.
it's not enough to just clear frames:
[[CCSpriteFrameCache sharedSpriteFrameCache] removeUnusedSpriteFrames];
In other scenarios where the sprite images are not so large, you can load them into batchNode at the moment the animation starts and delete them at the end.
source share