Merge lp:~jassmith/window-picker-applet/memory-leak into lp:window-picker-applet

Proposed by Jason Smith
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jassmith/window-picker-applet/memory-leak
Merge into: lp:window-picker-applet
Diff against target: None lines
To merge this branch: bzr merge lp:~jassmith/window-picker-applet/memory-leak
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Review via email: mp+11220@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

Memory leak fix

Revision history for this message
David Barth (dbarth) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/task-item.c'
2--- src/task-item.c 2009-09-01 09:51:30 +0000
3+++ src/task-item.c 2009-09-04 17:40:08 +0000
4@@ -203,12 +203,13 @@
5
6 if (gtk_icon_theme_has_icon (icon_theme, icon_name))
7 {
8-
9- pbuf = gdk_pixbuf_copy (gtk_icon_theme_load_icon (icon_theme,
10- icon_name,
11- size,
12- GTK_ICON_LOOKUP_FORCE_SIZE,
13- NULL));
14+ GdkPixbuf *internal = gtk_icon_theme_load_icon (icon_theme,
15+ icon_name,
16+ size,
17+ GTK_ICON_LOOKUP_FORCE_SIZE,
18+ NULL);
19+ pbuf = gdk_pixbuf_copy (internal);
20+ g_object_unref (internal);
21 }
22 }
23
24@@ -283,7 +284,7 @@
25
26 if (!pbuf)
27 {
28- pbuf = task_item_sized_pixbuf_for_window (item, priv->window, size);
29+ pbuf = priv->pixbuf = task_item_sized_pixbuf_for_window (item, priv->window, size);
30 }
31
32 if (active || priv->mouse_over || attention)

Subscribers

People subscribed via source and target branches

to all changes: