[Xfce4-commits] <parole:master> Initial, and probably incorrect attempts to fix memory leaks.
Sean Davis
noreply at xfce.org
Fri Nov 30 00:12:03 CET 2012
Updating branch refs/heads/master
to 142788a01a803c0c1dbdab9d2055bb755f59ec29 (commit)
from f77d7f7febf30d6658e7368c4ed2849c4f7cfa96 (commit)
commit 142788a01a803c0c1dbdab9d2055bb755f59ec29
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Nov 29 16:52:42 2012 -0500
Initial, and probably incorrect attempts to fix memory leaks.
src/gst/parole-gst.c | 4 ++++
src/misc/parole-stream.c | 3 +++
src/parole-player.c | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index b74c6a1..3b67267 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -562,6 +562,10 @@ parole_gst_load_logo (ParoleGst *gst)
gchar *path;
path = g_strdup_printf ("%s/parole.png", PIXMAPS_DIR);
+
+ if ( gst->priv->logo )
+ g_object_unref (G_OBJECT(gst->priv->logo));
+
gst->priv->logo = gdk_pixbuf_new_from_file (path, NULL);
g_free (path);
}
diff --git a/src/misc/parole-stream.c b/src/misc/parole-stream.c
index 2a9f8fe..c31dfb5 100644
--- a/src/misc/parole-stream.c
+++ b/src/misc/parole-stream.c
@@ -319,6 +319,9 @@ parole_stream_set_image (GObject *object, GdkPixbuf *pixbuf)
stream = PAROLE_STREAM (object);
+ if ( PAROLE_STREAM_GET_PRIVATE (stream)->image )
+ g_object_unref(G_OBJECT(PAROLE_STREAM_GET_PRIVATE (stream)->image));
+
if (pixbuf)
PAROLE_STREAM_GET_PRIVATE (stream)->image = gdk_pixbuf_copy(pixbuf);
else
diff --git a/src/parole-player.c b/src/parole-player.c
index 3cd7d26..4afde61 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -1630,6 +1630,7 @@ parole_player_media_tag_cb (ParoleGst *gst, const ParoleStream *stream, ParolePl
{
image = gdk_pixbuf_scale_simple(image, 200, 200, GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(player->priv->audiobox_cover), image);
+ g_object_unref(G_OBJECT(image));
}
else
gtk_image_set_from_icon_name(GTK_IMAGE(player->priv->audiobox_cover), "audio-x-generic", GTK_ICON_SIZE_ARTWORK_FALLBACK);
More information about the Xfce4-commits
mailing list