Mercurial > pidgin.yaz
changeset 9337:d0380151c6d1
[gaim-migrate @ 10145]
Chip tells me we need to be unrefing the GdkPixbufLoader object.
Now everything make sense. This should fix the massive leaks you've
been seeing.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Tue, 22 Jun 2004 00:31:30 +0000 |
parents | feb049ca7a47 |
children | 32d7a35a72d3 |
files | src/gtkaccount.c src/gtkblist.c src/gtkimhtml.c |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkaccount.c Tue Jun 22 00:29:23 2004 +0000 +++ b/src/gtkaccount.c Tue Jun 22 00:31:30 2004 +0000 @@ -479,7 +479,7 @@ height = gdk_pixbuf_get_height(pixbuf); format = gdk_pixbuf_loader_get_format(loader); gdk_pixbuf_loader_close(loader, NULL); - g_object_unref(G_OBJECT(pixbuf)); + g_object_unref(G_OBJECT(loader)); #endif pixbuf_formats = gdk_pixbuf_format_get_extensions(format);
--- a/src/gtkblist.c Tue Jun 22 00:29:23 2004 +0000 +++ b/src/gtkblist.c Tue Jun 22 00:31:30 2004 +0000 @@ -2656,9 +2656,10 @@ data = gaim_buddy_icon_get_data(icon, &len); gdk_pixbuf_loader_write(loader, data, len, NULL); buf = gdk_pixbuf_loader_get_pixbuf(loader); - + if (buf) + g_object_ref(G_OBJECT(buf)); gdk_pixbuf_loader_close(loader, NULL); - + g_object_unref(G_OBJECT(loader)); if (buf) { if (!GAIM_BUDDY_IS_ONLINE(b))
--- a/src/gtkimhtml.c Tue Jun 22 00:29:23 2004 +0000 +++ b/src/gtkimhtml.c Tue Jun 22 00:31:30 2004 +0000 @@ -3740,8 +3740,10 @@ GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, data, len, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); - + if (pixbuf) + g_object_ref(G_OBJECT(pixbuf)); gdk_pixbuf_loader_close(loader, NULL); + g_object_unref(G_OBJECT(loader)); } }