It’s important that you control the life cycle of scenes.
Notice that while there are sprites that use a certain texture you won’t be able to remove it’s texture from the cache.
Usually you create a new scene and then pass it to CCDirector:
// here the current scene (this) has
// all it's sprites alive and drawing
CCScene* scene = NewScene::create(); // this calls its init method
// here you have 2 scenes in memory at the same time
// sprites from the 1st are still alive, trying to empty TextureCache won't work
CCDirector::sharedDirector()->replaceScene(newScene); //tell the director to draw the newScene
As you can see, if you try to remove textures in NewScenes create, constructor or init it won’t make it.
Trying to remove them in the onExit() method you’ll still have the sprites alive, so no luck either.
The important thing here is to be sure sprites are deleted somewhere before you clean up the cache.
CCScene inherits CCNode, which will call removeAllChildren on it’s destructor.
After calling removeAllChildren with cleanup you can safely clean up the cache.
I’d try to call that before creating the next one, where more memory gets allocated.