internal static void Dispose(object instance) { Thread.ReaderWriterLockSlim @lock; if (Locks.TryGetValue(instance, out @lock)) { try { @lock.Dispose(); } catch { } } }