Permalink
Browse files

Fix memory leak in font loading

  • Loading branch information...
1 parent 17d5d86 commit 753c02e96be417c81edf2fd2e17a169958222f3e @nickg committed May 2, 2011
Showing with 4 additions and 2 deletions.
  1. +3 −1 src/Font.cpp
  2. +1 −1 src/Font.hpp
View
@@ -1,6 +1,6 @@
//
// Font.cpp -- A wrapper around FreeType.
-// Copyright (C) 2006 Nick Gasson
+// Copyright (C) 2006, 2011 Nick Gasson
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -165,6 +165,8 @@ void Font::MakeDisplayList(FT_Face face, char ch, GLuint listBase,
// Finish display list
glEndList();
+
+ FT_Done_Glyph(glyph);
}
void Font::SplitIntoLines(vector<string> &lines, const char* fmt, va_list ap)
View
@@ -1,6 +1,6 @@
//
// FreeType.hpp -- A wrapper around FreeType.
-// Copyright (C) 2006 Nick Gasson
+// Copyright (C) 2006, 2011 Nick Gasson
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by

0 comments on commit 753c02e

Please sign in to comment.