annotate Implab/Safe.cs @ 32:8eca2652d2ff
fixed: StackOverflow in IPromiseBase.Then(handler)
fixed: hang in ChainMap method on empty arrays
author |
cin |
date |
Tue, 08 Apr 2014 23:25:01 +0400 |
parents |
dafaadca5b9f |
children |
2c332a9c64c0 |
rev |
line source |
1
|
1 using System;
|
|
2 using System.Collections.Generic;
|
|
3 using System.Linq;
|
|
4 using System.Text;
|
|
5
|
|
6 namespace Implab
|
|
7 {
|
|
8 public static class Safe
|
|
9 {
|
31
|
10 public static void Dispose<T>(T obj) where T : class
|
1
|
11 {
|
2
|
12 var disp = obj as IDisposable;
|
|
13 if (disp != null)
|
|
14 disp.Dispose();
|
1
|
15 }
|
|
16 }
|
|
17 }
|