/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { // Dialog.Dispose() does not close an open dialog view so explicitly dismiss it before disposing _dialog?.Dismiss(); _dialog?.Dispose(); _dialog = null; _listView?.Dispose(); _listView = null; _adapter?.Dispose(); _adapter = null; _context = null; if (_notifyCollection != null) { _notifyCollection.CollectionChanged -= ItemsSourceCollectionChanged; _notifyCollection = null; } if (_selectedCollection != null) { _selectedCollection.CollectionChanged -= SelectedItems_CollectionChanged; _selectedCollection = null; } _indicatorView?.RemoveFromParent(); _indicatorView?.SetImageDrawable(null); _indicatorView?.SetImageBitmap(null); _indicatorView?.Dispose(); _indicatorView = null; } base.Dispose(disposing); }
/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { _dialog?.Dispose(); _dialog = null; _listView?.Dispose(); _listView = null; _adapter?.Dispose(); _adapter = null; _context = null; if (_notifyCollection != null) { _notifyCollection.CollectionChanged -= ItemsSourceCollectionChanged; _notifyCollection = null; } if (_selectedCollection != null) { _selectedCollection.CollectionChanged -= SelectedItems_CollectionChanged; _selectedCollection = null; } _indicatorView?.RemoveFromParent(); _indicatorView?.SetImageDrawable(null); _indicatorView?.SetImageBitmap(null); _indicatorView?.Dispose(); _indicatorView = null; } base.Dispose(disposing); }
/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { _dialog?.Dispose(); _dialog = null; _listView?.Dispose(); _listView = null; _adapter?.Dispose(); _adapter = null; _context = null; } base.Dispose(disposing); }
/// <summary> /// Dispose the specified disposing. /// </summary> /// <returns>The dispose.</returns> /// <param name="disposing">If set to <c>true</c> disposing.</param> protected override void Dispose(bool disposing) { if (disposing) { _dialog?.Dispose(); _dialog = null; _listView?.Dispose(); _listView = null; _adapter?.Dispose(); _adapter = null; _context = null; if (_notifyCollection != null) { _notifyCollection.CollectionChanged -= ItemsSourceCollectionChanged; _notifyCollection = null; } } base.Dispose(disposing); }