Merge pull request #17756 from perminovVS/set-font-atlas-memory-leak

Memory leak in setFontAtlas, if set equal font in Label.
This commit is contained in:
子龙山人 2017-05-03 17:23:28 +08:00 committed by GitHub
commit 5c3993836e
1 changed files with 4 additions and 0 deletions

View File

@ -584,6 +584,10 @@ void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false *
if (atlas == _fontAtlas)
{
if (_fontAtlas)
{
FontAtlasCache::releaseFontAtlas(_fontAtlas);
}
return;
}