I load my animated character with a huge texture this way:

```
[[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"MyFile.plist"];

```

And later, when I am no longer using the character, I release memory using:

```
[[CCSpriteFrameCache sharedSpriteFrameCache]removeSpriteFramesFromFile:@"MyFile.plist"];

```

And also:

```
[[CCTextureCache sharedTextureCache]removeTextureForKey:@"MyFile.png"];

```

Just to be sure.

I do that because the texture it uses consumes a lot of memory, so I make sure I dispose of it so my app doesn't crash. **Is the above code correct?**

Anyway, here is the actual problem: I eventually load my character again, and dispose of it again. Eventually, after a couple revives and kills, the app crashes. The log says nothing about it, so I can just suspect that it was due to memory - that's why I assumed that I wasn't disposing the texture properly.

I do need to create and dispose the character's texture. I can't afford to have it preloaded in the game.