|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -1,20 +1,17 | |||
|
1 | 1 | using System; |
|
2 | 2 | using System.Collections.Generic; |
|
3 | 3 | using System.Linq; |
|
4 | 4 | using System.Text; |
|
5 | 5 | |
|
6 | 6 | namespace Implab |
|
7 | 7 | { |
|
8 | 8 | public static class Safe |
|
9 | 9 | { |
|
10 |
public static void Dispose<T>( |
|
|
10 | public static void Dispose<T>(T obj) where T : class | |
|
11 | 11 | { |
|
12 | 12 | var disp = obj as IDisposable; |
|
13 | 13 | if (disp != null) |
|
14 | { | |
|
15 | 14 | disp.Dispose(); |
|
16 | obj = default(T); | |
|
17 | 15 |
|
|
18 | 16 |
|
|
19 | 17 | } |
|
20 | } |
General Comments 0
You need to be logged in to leave comments.
Login now