Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3520374

Browse filesBrowse 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 1ef7c13 commit 3520374
Copy full SHA for 3520374

File tree

1 file changed

+1
-3
lines changed
Filter options

1 file changed

+1
-3
lines changed

‎src/ft2font.cpp

Copy file name to clipboardExpand all lines: src/ft2font.cpp
+1-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.