Skip to content

Commit

Permalink
Fix another Qt memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 4, 2018
1 parent 903abe8 commit d30f1c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/native/gfx_es2/draw_text_qt.cpp
Expand Up @@ -140,6 +140,12 @@ void TextDrawerQt::ClearCache() {
}
cache_.clear();
sizeCache_.clear();
// Also wipe the font map.
for (auto iter : fontMap_) {
delete iter.second;
}
fontMap_.clear();
fontHash_ = 0;
}

void TextDrawerQt::DrawStringRect(DrawBuffer &target, const char *str, const Bounds &bounds, uint32_t color, int align) {
Expand Down

0 comments on commit d30f1c2

Please sign in to comment.