[f-spot] Hope this helps clean up a Pixbuf



commit 1ddd16616770912250148792bc13f9d21a510c93
Author: Stephen Shaw <sshaw decriptor com>
Date:   Fri Sep 7 23:11:34 2012 -0700

    Hope this helps clean up a Pixbuf

 src/Clients/MainApp/FSpot/TagSelectionWidget.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
index 84c8703..494ef55 100644
--- a/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
+++ b/src/Clients/MainApp/FSpot/TagSelectionWidget.cs
@@ -205,9 +205,10 @@ namespace FSpot {
 				Cms.Profile screen_profile;
 				if (FSpot.ColorManagement.Profiles.TryGetValue (Preferences.Get<string> (Preferences.COLOR_MANAGEMENT_DISPLAY_PROFILE), out screen_profile)) {
 					//FIXME, we're leaking a pixbuf here
-					Gdk.Pixbuf temp = tag.SizedIcon.Copy();
-					FSpot.ColorManagement.ApplyProfile (temp, screen_profile);
-					(renderer as CellRendererPixbuf).Pixbuf = temp;
+					using (Gdk.Pixbuf temp = tag.SizedIcon.Copy ()) {
+						FSpot.ColorManagement.ApplyProfile (temp, screen_profile);
+						(renderer as CellRendererPixbuf).Pixbuf = temp;
+					}
 				} else
 					(renderer as CellRendererPixbuf).Pixbuf = tag.SizedIcon;
 			} else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]