public void Dispose()
        {
            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
            _defaultCompartment = null;

            GC.SuppressFinalize(this);
        }
        public void Dispose()
        {
            while (_compartmentStack.Count > 0)
            {
                _compartmentStack.Pop().Dispose();
            }

            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
        }
Exemple #3
0
        public void Dispose()
        {
#if DEBUG
            if (_contextStack.Peek() != this)
            {
                throw new Exception("Missing dispose.");
            }
#endif
            _contextStack.Pop();

            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
            _defaultCompartment = null;

            GC.SuppressFinalize(this);
        }
Exemple #4
0
        public void Dispose()
        {
            if (_compartmentStack != null)
            {
                while (_compartmentStack.Count > 0)
                {
                    _compartmentStack.Pop().Dispose();
                }
                _compartmentStack = null;
            }

            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
            _defaultCompartment = null;

            GC.SuppressFinalize(this);
        }