Mercurial > pub > ImplabNet
view Implab/Safe.cs @ 22:5a35900264f5 promises
implemented nonblocking wake singnals processing
author | cin |
---|---|
date | Wed, 13 Nov 2013 14:03:00 +0400 |
parents | aa367305156b |
children | dafaadca5b9f |
line wrap: on
line source
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Implab { public static class Safe { public static void Dispose<T>(ref T obj) where T : class { var disp = obj as IDisposable; if (disp != null) { disp.Dispose(); obj = default(T); } } } }