Esempio n. 1
0
        public void Dispose()
        {
            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
            _defaultCompartment = null;

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

            if (_defaultCompartment != null)
            {
                _defaultCompartment.Dispose();
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }