Removed FT_DoneGlyph and clean up delete []
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
diff --git a/src/FTBitmapGlyph.cpp b/src/FTBitmapGlyph.cpp
index 948f78e..ecb3b73 100755
--- a/src/FTBitmapGlyph.cpp
+++ b/src/FTBitmapGlyph.cpp
@@ -49,10 +49,6 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph)
advance = static_cast<float>(glyph->advance.x >> 16);
pos.x = bitmap->left;
pos.y = srcHeight - bitmap->top;
-
- // discard glyph image (bitmap or not)
- // Is this the right place to do this?
- FT_Done_Glyph( glyph );
}
diff --git a/src/FTExtrdGlyph.cpp b/src/FTExtrdGlyph.cpp
index 46c5fc9..bdb3aaa 100644
--- a/src/FTExtrdGlyph.cpp
+++ b/src/FTExtrdGlyph.cpp
@@ -176,17 +176,11 @@ FTExtrdGlyph::FTExtrdGlyph( FT_Glyph glyph, float d)
delete [] frontMesh;
delete [] backMesh;
delete [] contourLength;
-
- // discard glyph image (bitmap or not)
- FT_Done_Glyph( glyph); // Why does this have to be HERE
}
FTExtrdGlyph::~FTExtrdGlyph()
-{
-// if( data)
-// delete [] data; // FIXME
-}
+{}
bool FTExtrdGlyph::Winding( int numPoints, FTGL_DOUBLE *points)
diff --git a/src/FTOutlineGlyph.cpp b/src/FTOutlineGlyph.cpp
index 1722dbf..cff12ac 100644
--- a/src/FTOutlineGlyph.cpp
+++ b/src/FTOutlineGlyph.cpp
@@ -61,19 +61,13 @@ FTOutlineGlyph::FTOutlineGlyph( FT_Glyph glyph)
}
glEndList();
- delete [] data; // FIXME
- delete [] contourLength; // FIXME
-
- // discard glyph image (bitmap or not)
- FT_Done_Glyph( glyph); // Why does this have to be HERE
+ delete [] data;
+ delete [] contourLength;
}
FTOutlineGlyph::~FTOutlineGlyph()
-{
-// delete [] data;
-// delete [] contourLength;
-}
+{}
float FTOutlineGlyph::Render( const FT_Vector& pen)
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index d378aa9..3ad3fdc 100755
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -60,10 +60,6 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
advance = glyph->advance.x >> 16;
pos.x = bitmap->left;
pos.y = srcHeight - bitmap->top;
-
- // discard glyph image (bitmap or not)
- // Is this the right place to do this?
- FT_Done_Glyph( glyph );
}
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 2fda96f..fc9133c 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -57,19 +57,12 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
}
glEndList();
- delete [] data; // FIXME
- data = 0;
-
- // discard glyph image (bitmap or not)
- FT_Done_Glyph( glyph); // Why does this have to be HERE
+ delete [] data;
}
FTPolyGlyph::~FTPolyGlyph()
-{
-// if( data)
-// delete [] data; // FIXME
-}
+{}
float FTPolyGlyph::Render( const FT_Vector& pen)
diff --git a/src/FTTextureGlyph.cpp b/src/FTTextureGlyph.cpp
index 858c6b0..62e06ff 100755
--- a/src/FTTextureGlyph.cpp
+++ b/src/FTTextureGlyph.cpp
@@ -45,6 +45,7 @@ FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int id, int xOffset, int yOffset
glBindTexture( GL_TEXTURE_2D, glTextureID);
glTexSubImage2D( GL_TEXTURE_2D, 0, xOffset, yOffset, destWidth, destHeight, GL_ALPHA, GL_UNSIGNED_BYTE, data);
+ delete [] data;
}
@@ -68,13 +69,6 @@ FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int id, int xOffset, int yOffset
pos.x = bitmap->left;
pos.y = bitmap->top;
-
- if( data)
- delete [] data;
-
-// discard glyph image (bitmap or not)
- // Is this the right place to do this?
- FT_Done_Glyph( glyph);
}