# HG changeset patch # User cin # Date 2015-01-25 23:12:01 # Node ID f7b2b8bfbb8caec81c78ffdb06511332de041f96 # Parent f803565868a48e97b680333923938b991bfe6728 minor changes diff --git a/Implab/Safe.cs b/Implab/Safe.cs --- a/Implab/Safe.cs +++ b/Implab/Safe.cs @@ -36,11 +36,11 @@ namespace Implab throw new ArgumentOutOfRangeException(paramName); } - public static void Dispose(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]