summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichael Vrable <mvrable@cs.ucsd.edu>2008-06-20 21:42:34 -0700
committerCarlos Garcia Campos <carlosgc@gnome.org>2008-06-26 11:37:56 +0200
commit9134b3200fa3573c6940f4b321a71317dfc00e79 (patch)
treee6c3a897ee9c1d53b80c483f89a174b4f3aa8fcc /CMakeLists.txt
parent7eaecdaa78abdb80c4f6126dc3d09ad5cfa79f1a (diff)
Use a single global FT_Library in CairoOutputDev
Cairo may internally keep references to the FreeType fonts loaded in CairoFontEngine even after poppler is done with them. Commit 42db4890e829 ("Do not call FT_Done_Face on a live cairo_font_face_t") introduced a fix for one use-after-free bug, by delaying deleting an FT_Face objects until cairo is done with it. That fix doesn't correct all the bugs. An FT_Library object is created for each CairoOutputDev object, and deleted when the CairoOutputDev goes away. But the FT_Library object should not be deleted while fonts loaded using it are still in use. And cairo can keep references to fonts around more or less indefinitely. To more fully fix the problem, we can either: 1. Keep a count of not-yet-deleted fonts associated with each FT_Library, and wait to call FT_Done_FreeType until it drops to zero. 2. Never call FT_Done_FreeType. The second option is the simplest. To avoid leaking memory FT_Library objects, use a single global FT_Library instead of a per-CairoOutputDev copy.
Diffstat (limited to 'CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions