Thank you, I believe, that helps.
I think, it's a way of clean programming to free all allocated memory when used no longer, at the latest on exiting. The reason for calling FT_DONE_FACE in the destructor ~FTFace, I found in the common header /usr/include/freetype2/freetype/freetype.h:
- Code: Select all
/* Each face object also owns a single @FT_GlyphSlot object, as well */
/* as one or more @FT_Size objects. */
/* Use @FT_New_Face or @FT_Open_Face to create a new face object from */
/* a given filepathname or a custom input stream. */
/* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
That's nothing else than calling some internal destructors. We can comment that out and probably we won't notice any effect, but as I said, for clean programming ...
I don't know why ETR 0.4 doesn't call the destructor, I'll check it. In case of the latest svn revsion 230 the font objects are used globally, the font instances are initialized at start time and destroyed automatically on exiting. Maybe, this late call of the destructor will cause errors in some cases. I'll try to change this in further revisions. And you will report if the error still exists, ok?