Merge authors: Chow Loong Jin (hyperair) Related merge proposals: https://code.launchpad.net/~ted/indicator-messages/mem-leaks/+merge/47088 proposed by: Ted Gould (ted) review: Approve - Conor Curran (cjcurran) ------------------------------------------------------------ revno: 231 [merge] committer: Ted Gould <t...@gould.cx> branch nick: trunk timestamp: Wed 2011-09-21 15:14:17 -0500 message: Memory leak on pixbufs modified: src/indicator-messages.c
-- lp:indicator-messages https://code.launchpad.net/~indicator-applet-developers/indicator-messages/trunk Your team ayatana-commits is subscribed to branch lp:indicator-messages. To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-messages/trunk/+edit-subscription
=== modified file 'src/indicator-messages.c' --- src/indicator-messages.c 2011-08-25 02:29:38 +0000 +++ src/indicator-messages.c 2011-09-21 20:14:17 +0000 @@ -653,6 +653,7 @@ width, height, GDK_INTERP_BILINEAR); + g_object_unref(pixbuf); } else { g_debug("Happy with icon sized %dx%d", gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); resized_pixbuf = pixbuf; @@ -660,10 +661,7 @@ gtk_image_set_from_pixbuf(GTK_IMAGE(mi_data->icon), resized_pixbuf); - /* The other pixbuf should be free'd by the dbusmenu. */ - if (resized_pixbuf != pixbuf) { - g_object_unref(resized_pixbuf); - } + g_object_unref(resized_pixbuf); gtk_widget_show(mi_data->icon); } else { @@ -715,6 +713,7 @@ width, height, GDK_INTERP_BILINEAR); + g_object_unref(pixbuf); } else { g_debug("Happy with icon sized %dx%d", gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf)); resized_pixbuf = pixbuf; @@ -722,10 +721,7 @@ gtk_image_set_from_pixbuf(GTK_IMAGE(mi_data->icon), resized_pixbuf); - /* The other pixbuf should be free'd by the dbusmenu. */ - if (resized_pixbuf != pixbuf) { - g_object_unref(resized_pixbuf); - } + g_object_unref(resized_pixbuf); } gtk_misc_set_alignment(GTK_MISC(mi_data->icon), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(hbox), mi_data->icon, FALSE, FALSE, 0);
_______________________________________________ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp