Sorry my English.
I think I found a error in FNTConfigRemoveCache method in the file “label_nodes\CCLabelBMFont.cpp”
In some cases using of this method can increase memory usage.
For example:
repeating sequence of ‘applicationDidReceiveMemoryWarning’ and creation of CCLabelBMFont node will get next result -
each instance of CCLabelBMFont node got its own copy of FNT configuration instead of reusing of cached.
I think FNTConfigRemoveCache have to be rewritten as follows:
@
void FNTConfigRemoveCache( void )
{
if (configurations)
{
configurations~~>begin;
std::string key = “”;
CCBMFontConfiguration* pConfiguration = NULL;
while) )
{
if 1 )
{
CCLOG(“cocos2d: FNTConfig Cache: removing unused config: %s”, key.c_str());
configurations->removeObjectForKey(key);
}
}
configurations->end();
if (0 configurations~~\>count())
{
CC_SAFE_RELEASE_NULL(configurations);
}
}
}
@