Esempio n. 1
0
        protected virtual void Dispose(bool disposing)
        {
            lock (_disposalLockObject)
            {
                if (_isDisposed)
                {
                    return;
                }
                _isDisposed = true;
            }

            if (disposing)
            {
                _comSafe?.TryRemove(this);

                if (!_rewrapping && !IsWrappingNullReference && !HasBeenReleased)
                {
                    Release();
                }

                _comSafe = null;
            }
        }