public void TearDown()
 {
     _outlookBar.Dispose();
     _tab1.Dispose();
     _tab2.Dispose();
     _tab3.Dispose();
 }
Esempio n. 2
0
        // IDisposable
        protected virtual void Dispose(bool disposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType() + ". ****** ");
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
                // free managed and unmanaged resources when explicitly called
                if (_disposeOwner && _owner != null)
                {
                    _owner.Dispose();
                }
                if (_disposeImage && _Image != null)
                {
                    _Image.Dispose();
                }
            }

            // free unmanaged resources
            _owner = null;
            _Image = null;

            IsDisposed = true;
        }