Fix for GrAtlasTextContext memory leak

BUG=skia:

Review URL: https://codereview.chromium.org/1072193009
This commit is contained in:
joshualitt 2015-04-22 11:24:20 -07:00 committed by Commit bot
parent 8892277d0b
commit 12c20e40a4

View File

@ -252,6 +252,12 @@ private:
, fMinMaxScale(SK_ScalarMax) , fMinMaxScale(SK_ScalarMax)
, fTextType(0) {} , fTextType(0) {}
~BitmapTextBlob() override {
for (int i = 0; i < fRunCount; i++) {
fRuns[i].~Run();
}
}
static const Key& GetKey(const BitmapTextBlob& blob) { static const Key& GetKey(const BitmapTextBlob& blob) {
return blob.fKey; return blob.fKey;
} }