[Webkit-unassigned] [Bug 16941] New: [GTK] FontCustomPlatformData.cpp leaks FT_Faces
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jan 19 09:54:02 PST 2008
http://bugs.webkit.org/show_bug.cgi?id=16941
Summary: [GTK] FontCustomPlatformData.cpp leaks FT_Faces
Product: WebKit
Version: 525+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Keywords: Gtk, Cairo
Severity: Normal
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: alp at atoker.com
The newly created memory face needs to be destroyed manually according to the
documentation.
Since we also need to free the SharedBuffer, we can't just add another user key
I think.
It might be better to add the newly created FontCustomPlatformData as the user
data and do the freeing from there. Not sure yet what the best fix is.
FT_Face face;
error = FT_New_Memory_Face(library, reinterpret_cast<const
FT_Byte*>(buffer->data()), buffer->size(), 0, &face);
if (error)
return 0;
buffer->ref();
cairo_font_face_t* fontFace = cairo_ft_font_face_create_for_ft_face(face,
0);
static cairo_user_data_key_t bufferKey;
cairo_font_face_set_user_data(fontFace, &bufferKey, buffer, releaseData);
return new FontCustomPlatformData(fontFace);
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list