changeset 126:f7b2b8bfbb8c v2

minor changes
author cin
date Mon, 26 Jan 2015 02:12:01 +0300
parents f803565868a4
children d86da8d2d4c3
files Implab/Safe.cs
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Implab/Safe.cs	Thu Jan 15 12:09:20 2015 +0300
+++ b/Implab/Safe.cs	Mon Jan 26 02:12:01 2015 +0300
@@ -36,11 +36,11 @@
                 throw new ArgumentOutOfRangeException(paramName);
         }
 
-        public static void Dispose<T>(T obj) where T : class
+        public static void Dispose(params IDisposable[] objects)
         {
-            var disp = obj as IDisposable;
-            if (disp != null)
-                disp.Dispose();
+            foreach(var d in objects)
+                if (d != null)
+                    d.Dispose();
         }
 
         [DebuggerStepThrough]