Merge "Fix bug 6558006: SystemUI native heap is huge. Fix memory leak" into jb-dev
This commit is contained in:
@@ -992,6 +992,10 @@ HB_Face TextLayoutShaper::getCachedHBFace(SkTypeface* typeface) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TextLayoutShaper::purgeCaches() {
|
void TextLayoutShaper::purgeCaches() {
|
||||||
|
size_t cacheSize = mCachedHBFaces.size();
|
||||||
|
for (size_t i = 0; i < cacheSize; i++) {
|
||||||
|
HB_FreeFace(mCachedHBFaces.valueAt(i));
|
||||||
|
}
|
||||||
mCachedHBFaces.clear();
|
mCachedHBFaces.clear();
|
||||||
unrefTypefaces();
|
unrefTypefaces();
|
||||||
init();
|
init();
|
||||||
|
|||||||
Reference in New Issue
Block a user