예제 #1
0
 private void Dispose(bool disposeManagedResources)
 {
     if (disposeManagedResources)
     {
         if (Interlocked.CompareExchange(ref _disposing, 1, 0) == 0)
         {
             _wrapped.Dispose();
             _wrapped = null;
         }
     }
 }
예제 #2
0
        private void Dispose(bool disposeManagedResources)
        {
            if (!disposeManagedResources)
            {
                return;
            }

            if (Interlocked.CompareExchange(ref _disposing, 1, 0) != 0)
            {
                return;
            }

            _wrapped?.Dispose();
            _wrapped = null;
        }
예제 #3
0
 public void Dispose()
 {
     _threadLocal.Dispose();
     _dispatchesPerStmtTl.Dispose();
 }