Exemplo n.º 1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         BindingContext.ClearAllBindings();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         BindingContext.ClearAllBindings();
     }
     base.Dispose(disposing);
 }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _bindingContext.ClearAllBindings();
                _cachedDataContext = null;
            }

            base.Dispose(disposing);
        }
Exemplo n.º 4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         BindingContext.ClearAllBindings();
         foreach (IDisposable disposable in _disposables)
         {
             disposable.Dispose();
         }
         _disposables.Clear();
     }
     base.Dispose(disposing);
 }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _bindingContext.ClearAllBindings();
                _cachedDataContext = null;

                if (ItemView != null)
                {
                    ItemView.Click     -= this.OnItemViewOnClick;
                    ItemView.LongClick -= this.OnItemViewOnLongClick;
                }
            }

            base.Dispose(disposing);
        }
Exemplo n.º 6
0
        protected override void Dispose(bool disposing)
        {
            // Clean up the binding context since nothing
            // explicitly Disposes of the ViewHolder.
            _bindingContext?.ClearAllBindings();

            if (disposing)
            {
                _cachedDataContext = null;

                if (ItemView != null)
                {
                    ItemView.Click     -= OnItemViewOnClick;
                    ItemView.LongClick -= OnItemViewOnLongClick;
                }
            }

            base.Dispose(disposing);
        }
Exemplo n.º 7
0
        protected override void Dispose(bool disposing)
        {
            // Clean up the binding context since nothing
            // explicitly Disposes of the ViewHolder.
            itemViewClickSubscription?.Dispose();
            itemViewClickSubscription = null;
            itemViewLongClickSubscription?.Dispose();
            itemViewLongClickSubscription = null;

            _cachedDataContext = null;
            clickSubscription?.Dispose();
            longClickSubscription?.Dispose();

            if (_bindingContext != null)
            {
                _bindingContext.DataContext = null;
                _bindingContext.ClearAllBindings();
                _bindingContext.DisposeIfDisposable();
                _bindingContext = null;
            }

            base.Dispose(disposing);
        }