Mercurial > pidgin
changeset 9335:b726aba28229
[gaim-migrate @ 10143]
This should either fix some leaks, or crash.
Looks like it doesn't crash.
Someone read the documentation for gdk_pixbuf_loader_get_pixbuf and
explain to me how it doesn't say to do things that why that I was doing
them that was apparently leaking.
Oh and thanks to nosnilmot, or just submitted a patch that uses
gdk_pixbuf_loader without leaking, giving me an example of how it should
be done.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Mon, 21 Jun 2004 23:49:56 +0000 |
parents | b2f102b8abf1 |
children | feb049ca7a47 |
files | src/gtkblist.c src/gtkimhtml.c |
diffstat | 2 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Mon Jun 21 23:42:05 2004 +0000 +++ b/src/gtkblist.c Mon Jun 21 23:49:56 2004 +0000 @@ -2656,8 +2656,7 @@ 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);
--- a/src/gtkimhtml.c Mon Jun 21 23:42:05 2004 +0000 +++ b/src/gtkimhtml.c Mon Jun 21 23:49:56 2004 +0000 @@ -3740,8 +3740,7 @@ 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); }