Пример #1
0
        public void Dispose()
        {
            _dlgView.Destroy();
            _dlgView.Parent = null;
            Dialogs.DisposeModelAndChildrenRenderers(_dlgView);
            _dlgView.BindingContext = null;
            _dlgView = null;

            var tapGesture = _overlayView.GestureRecognizers.FirstOrDefault();

            _overlayView.RemoveGestureRecognizer(tapGesture);
            tapGesture?.Dispose();

            _overlayView.RemoveFromSuperview();
            _overlayView.Dispose();
            _overlayView = null;

            _contentViewController.TransitioningDelegate = null;
            _contentViewController.Dispose();
            _contentViewController = null;

            _dialogController.Dispose();
            _dialogController = null;

            _renderer = null;
        }
Пример #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _dlgView.Destroy();
                _dlgView.LayoutNative   = null;
                _dlgView.BindingContext = null;
                _dlgView.Parent         = null;
                _dlgView = null;

                _contentView.Touch -= _contentView_Touch;

                _container?.Dispose();
                _container = null;

                if (!_renderer.View.IsDisposed())
                {
                    _renderer.View.Dispose();
                }

                _contentView.Dispose();
                _contentView = null;

                _renderer.Dispose();
                _renderer = null;

                OnceInitializeAction = null;
            }
            base.Dispose(disposing);
        }
Пример #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _dlgView.Destroy();
                _dlgView.BindingContext = null;
                _dlgView.Parent         = null;
                _dlgView = null;

                _contentView.Touch -= _contentView_Touch;
                _contentView.SetOnKeyListener(null);


                if (!_renderer.View.IsDisposed())
                {
                    _renderer.View.Dispose();
                }

                _contentView.Dispose();
                _contentView = null;

                _renderer.Dispose();
                _renderer = null;

                _extraDialog = null;

                OnceInitializeAction = null;
            }
            base.Dispose(disposing);
        }