The freetype glyph is now disposed of correctly after initialsation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index bc486ec..3800b53 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -85,6 +85,9 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph, unsigned int gi)
return;
Tesselate();
+
+ // discard glyph image (bitmap or not)
+ FT_Done_Glyph( glyph); // Why does this have to be HERE
}
diff --git a/src/FTVectorGlyph.cpp b/src/FTVectorGlyph.cpp
index 2e9613a..1aea823 100755
--- a/src/FTVectorGlyph.cpp
+++ b/src/FTVectorGlyph.cpp
@@ -16,7 +16,9 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, unsigned int gi)
glList(0)
{
if( ft_glyph_format_outline != glyph->format)
- { return;}
+ {
+ return;
+ }
vectoriser = new FTVectoriser( glyph);
@@ -56,6 +58,8 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, unsigned int gi)
}
glEndList();
+ // discard glyph image (bitmap or not)
+ FT_Done_Glyph( glyph); // Why does this have to be HERE
}