예제 #1
0
        public void Dispose()
        {
            if (_view.ViewModel != null)
            {
                _view.ViewModel.LastTabClosed -= viewModel_LastTabClosed;
            }

            if (_presenter != null)
            {
                _presenter.Dispose();
            }
        }
        private void Dispose(bool disposing)
        {
            if (!disposing || _disposed)
            {
                return;
            }

            if (_view.ViewModel != null)
            {
                _view.ViewModel.LastTabClosed -= viewModel_LastTabClosed;
            }
            _presenter?.Dispose();

            _disposed = true;
        }
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                return;
            }

            if (_view.ViewModel != null)
            {
                _view.ViewModel.LastTabClosed -= viewModel_LastTabClosed;
            }

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