On 16.08.2017 at 07:17 Werner LEMBERG wrote:
>> The documentation of FT_Done_FreeType() says: >> Destroy a given FreeType library object and all of its children, >> including resources, drivers, faces, sizes, etc. >> So let's suppose there is a sloppy program which doesn't call >> FT_Done_Face() on every face it opened using FT_New_Face(). Will >> FT_Done_FreeType() automatically call FT_Done_Face() for every face >> still open in that case? > Yes. >> From my observations this doesn't seem to be the case with a >> snapshot version of freetype 2.5.4 currently used by me although the >> doc makes it sound like it will do it. > Really? I tried the small test program below, and everything gets > freed properly. However, it seems that you have a more specific > problem, so please provide a similar code snippet that exhibits your > issue. Ok, I debugged it and cairo was the culprit. It is leaking memory unless you call cairo_debug_reset_static_data(). If you don't call cairo_debug_reset_static_data() then FT_Done_FreeType() is never called by cairo and some faces remain open. -- Best regards, Andreas Falkenhahn mailto:[email protected] _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
