8000 Fix leak of FreeType glyphs. · QuLogic/matplotlib@e073080 · GitHub
[go: up one dir, main page]

Skip to content

Commit e073080

Browse files
committed
Fix leak of FreeType glyphs.
Resizing the glyph vector simply drops the pointers, but does not free them. The clear() method does all of this work as well as resetting the pen location.
1 parent ffc4b4a commit e073080

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ft2font.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,7 @@ void FT2Font::set_text(
601601
FT_Bool use_kerning = FT_HAS_KERNING(face);
602602
FT_UInt previous = 0;
603603

604-
glyphs.resize(0);
605-
pen.x = 0;
606-
pen.y = 0;
604+
clear();
607605

608606
bbox.xMin = bbox.yMin = 32000;
609607
bbox.xMax = bbox.yMax = -32000;

0 commit comments

Comments
 (0)
0