unref the thumbnail image after passing it to the callback. Callers will
2008-04-20 Jens Granseuer <jensgr@gmx.net> * theme-thumbnail.c: (message_from_child): unref the thumbnail image after passing it to the callback. Callers will have to ref it if they want to keep it until after the callback has returned 2008-04-20 Jens Granseuer <jensgr@gmx.net> * appearance-style.c: (update_thumbnail_in_treeview): * appearance-themes.c: (theme_thumbnail_update), (theme_thumbnail_generate): adapt to modified refcounting in the thumbnailer; thumbnails don't need to be unref'ed unless we explicitly retain a reference svn path=/trunk/; revision=8661
This commit is contained in:
parent
ae6085786e
commit
10e93c23ad
5 changed files with 21 additions and 7 deletions
|
@ -842,12 +842,15 @@ message_from_child (GIOChannel *source,
|
|||
memcpy (pixels + rowstride * i, async_data.data->data + 4 * async_data.thumbnail_width * i, async_data.thumbnail_width * 4);
|
||||
}
|
||||
|
||||
/* callback function needs to unref the pixbuf */
|
||||
/* callback function needs to ref the pixbuf if it wants to keep it */
|
||||
(* async_data.func) (pixbuf, async_data.theme_name, async_data.user_data);
|
||||
|
||||
if (async_data.destroy)
|
||||
(* async_data.destroy) (async_data.user_data);
|
||||
|
||||
if (pixbuf)
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
/* Clean up async_data */
|
||||
g_free (async_data.theme_name);
|
||||
g_source_remove (async_data.watch_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue