Deleting sprite sheets and free memory

Deleting sprite sheets and free memory
0.0 0


I am facing an issue with deleting the sprite sheets and freeing the memory
I am adding the complete animal sprite batchnode and sprite frame by this code:

// —— init animal variables ——————————————

string animalSpriteFile = animal.pvr.ccz
string animalSpritePlist = animal.plist
// ------ add animal batch node ------------------------------------------
 CCSpriteBatchNode *animalBatchNode = CCSpriteBatchNode::create(animalSpriteFile.c_str());
 CCSpriteFrameCache*   animalSpriteCache = CCSpriteFrameCache::sharedSpriteFrameCache();
    this->addChild(animalBatchNode );  

// add the animal
CCSprite*    animal = CCSprite::createWithSpriteFrameName(animalImgNames[0].c_str());
    animal->setPosition(ccp(posX, posY));
    animalBatchNode->addChild(animal, z_Index++);

// animate the animal
    CCArray* animFrames = CCArray::createWithCapacity(totalAnimalSprites);
    for(int k = 0; k spriteFrameByName(animalImgNames[k].c_str());
    CCAnimation* animation = CCAnimation::createWithSpriteFrames(animFrames, animalAnimSpeed);

Now I am removing the complete animal with batchnode and sprite frame by this code:

// --------------------------------------------------------------
         for(int k = 0; kremoveTextureForKey (animalImgNames[k].c_str());
        for(int k = 0; k removeSpriteFrameByName(animalImgNames[k].c_str());
        this->removeChild(animalBatchNode, true);

I have some 4 different types of animals so when these animals are added, 7 MB of memory is being added.
But when I am removing the animals, there is no change in memory usage…

Please point me where am I wrong? I want this memory usage to be remove completely.