[banshee] [TrackInfoDisplay] Fix a memory leak (bgo#555365)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [TrackInfoDisplay] Fix a memory leak (bgo#555365)
- Date: Tue, 9 Feb 2010 22:52:25 +0000 (UTC)
commit cdb50891b60cd0fbb4cf2b8dba9cd4f9c46a7f29
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Wed Feb 10 09:46:30 2010 +1100
[TrackInfoDisplay] Fix a memory leak (bgo#555365)
Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>
.../Banshee.Gui.Widgets/TrackInfoDisplay.cs | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
index b9d0a9a..27716fd 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
@@ -406,6 +406,9 @@ namespace Banshee.Gui.Widgets
string artwork_id = track.ArtworkId;
if (current_artwork_id != artwork_id || force) {
current_artwork_id = artwork_id;
+ if (incoming_image != null && current_image != incoming_image && !IsMissingImage (incoming_image)) {
+ ((IDisposable)incoming_image).Dispose ();
+ }
incoming_image = artwork_manager.LookupScaleSurface (artwork_id, ArtworkSizeRequest);
}
@@ -414,6 +417,9 @@ namespace Banshee.Gui.Widgets
}
if (track == current_track) {
+ if (current_image != null && current_image != incoming_image && !IsMissingImage (current_image)) {
+ ((IDisposable)current_image).Dispose ();
+ }
current_image = incoming_image;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]