Commit 17eb8aeb562f2160b4fbb4192e178d9bd101f783

henry 2002-02-02T00:16:36

Removed FT_DoneGlyph and clean up delete []

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);
 }