I just had a look at this, and there are two reasons for the problem:
(1) Sparrow's new Texture Cache
I noticed frequently that developers would create several texture instances from the same file, instead of re-using one instance. To make sure that this is not a problem, Robert recently added a texture cache. When you do the following now:
SPTexture *textureA = [SPTexture textureWithContentsOfFile:@"texture.png"];
SPTexture *textureB = [SPTexture textureWithContentsOfFile:@"texture.png"];
then the file won't be loaded 2 times. In fact, both instances will point to the same texture instance.
Of course, this also means that a texture is not released right away any longer; instead, the texture will be released only when the system reports that it requires more memory.
The cache is implemented using "NSCache", which was built for exactly this reason; so don't worry, no Voodoo is going on here. 😉
However, personally, I want total control over the memory — as you do, probably, as you are an advanced user. In that case, you can deactivate this cache completely. Simply call this before you load any textures.
[SPTexture setCachingEnabled:NO];
This needs documentation, of course! I'll add that to the manual as soon as this version is officially released. Thanks for the reminder!
(2) However ...
Still, Sparrow did not release the texture in the sample you provided, which puzzled me.
It turned out that there was a "release" call missing for that special situation (a scene with only images that are all removed from the stage). Nothing critical — in a real world scenario, nothing would have happened. Still, it needed fixing! If you pull now, your sample should act just as expected, after turning off the texture cache.
Thanks a lot for the heads-up!
I hope that helps! 😃