Mercurial > pub > ImplabNet
diff Implab/Safe.cs @ 126:f7b2b8bfbb8c v2
minor changes
author | cin |
---|---|
date | Mon, 26 Jan 2015 02:12:01 +0300 |
parents | 62d2f1e98c4e |
children | 6241bff0cd64 |
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]