Hi all,
I am using the following code in order to change my animated background "bg", which is a CCsprite and global.
UIImage *tarpic = [UIImage imageNamed:[NSString stringWithFormat:@"bg2%i.png",rememberActualLevel]];
CCTexture2D *tartex = [[CCTexture2D alloc] initWithImage:tarpic];
[bg setTexture:tartex];
Everything is running fine. Now I am working on a HD version of my iPhone app. The problem I have now is that I am consuming more and more memory (not leaked!) from level background to background. Therefore iPad exits at a certain time, because it can not free enough memory upon a memory warning anymore.
I am sure the answer is simple, but looks like I am using a "long land line" right now:
Is there anything special I need to consider for the memory management here?
BtW: I am using this process also for some other sprites... So not the BG itself is the only one which gives me a hard time ;-)
Thanks for the help in advance.
Kai
PS: Forgot to mention that the reason I believe that this might be the problem is, that I see more texture buffers in instruments over time.