Calling setTTFConfig on an existing label object results in a memory leak. It calls SpriteBatchNode::initWithTexture and there you create a new Texture with βnewβ the old one is never freed.
Would not have happened with smart pointers
+1 for replacing cocos retain/release with smart pointers!
I think this code is useless because all unused atlases automatically purges from atlas cache. But on receiving memory warning some atlases leaks because of
_atlasMap.clear();
without releasing all the atlases. If we release all the atlases before cleaning, existing labels crashes.