[Webkit-unassigned] [Bug 28346] [GTK] Support for cursors that are images
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 18 15:12:01 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28346
--- Comment #7 from Martin Robinson <martin.james.robinson at gmail.com> 2009-08-18 15:12:00 PDT ---
(In reply to comment #6)
> (From update of attachment 35022 [details])
> Why is the memory management correct here? Do we need to release/destroy this
> cursor ever?
>
> I take it "getGdkPixbuf()" causes the pixbuf to be reffed?
getGdkPixbuf() constructs a new GdkPixbuf* from a cairo_surface_t*. Its
reference count will be initialized to 1. gdk_cursor_new_from_pixbuf will copy
bytes from a GdkPixbuf* as can be seen here:
http://google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#83-cTy5ZCbw/gtk+-2.4.12/gdk/x11/gdkcursor-x11.c&q=gdk_cursor_new_from_pixbuf&l=387
Since the GdkPixbuf was merely an intermediary between the cairo_surface_t and
the GdkPointer, it is no longer needed. gdk_pixbuf_unref will decrease the
reference count of the GdkPixbuf from 1 to 0, freeing the memory and preventing
a leak.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list