[banshee] Implement IDisposable in LazyLoadSourceContents
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Implement IDisposable in LazyLoadSourceContents
- Date: Sat, 28 Nov 2009 00:36:35 +0000 (UTC)
commit 9f83abdd985e0ddab2c9b49afbb26360a21e7eba
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Nov 27 16:30:13 2009 -0800
Implement IDisposable in LazyLoadSourceContents
.../Banshee.Sources.Gui/LazyLoadSourceContents.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/LazyLoadSourceContents.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/LazyLoadSourceContents.cs
index 6c0be7a..d27e81f 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/LazyLoadSourceContents.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/LazyLoadSourceContents.cs
@@ -34,7 +34,7 @@ using Banshee.Sources;
namespace Banshee.Sources.Gui
{
- public class LazyLoadSourceContents<T> : ISourceContents where T : ISourceContents
+ public class LazyLoadSourceContents<T> : ISourceContents, IDisposable where T : ISourceContents
{
private object [] args;
private ISourceContents actual_contents;
@@ -57,6 +57,14 @@ namespace Banshee.Sources.Gui
this.args = args;
}
+ public void Dispose ()
+ {
+ var disposable = actual_contents as IDisposable;
+ if (disposable != null) {
+ disposable.Dispose ();
+ }
+ }
+
public bool SetSource (ISource source)
{
return ActualContents.SetSource (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]