If I have a background:
CCSprite bg = [CCSprite spriteWithSpriteFrameName:@"bg.png"];
[self addChild:bg]
And then I assign the bg to a new image
bg = [CCSprite spriteWithSpriteFrameName:@"bg2.png"];
Just wondering if I have the right idea about this: My bg is pointed to an image in the cache. So when I'm adding bg as a child I'm not making a copy of bg.png, I'm just referencing it. So it's perfectly ok to change my background this way and I can reference my bg pointer to other images in my cache how many times I want to (lets say 100 tmes) and it won't cause memory problems.
Is that right?
But I was also wondering, what happens to bg.png when I'm not referencing it anymore? For how long will it stay in the cache and do I have to manually release the image files when I'm done with it?