protected override void OnDestroy() { // may never be called base.OnDestroy(); if (_application != null) { _application.PropertyChanged -= AppOnPropertyChanged; } PopupManager.Unsubscribe(this); ((IDisposable)Platform)?.Dispose(); }
protected override void OnDestroy() { PreviousActivityDestroying.Reset(); if (_application != null) { _application.PropertyChanged -= AppOnPropertyChanged; } PopupManager.Unsubscribe(this); if (Platform != null) { _layout.RemoveView(Platform); Platform.Dispose(); } PreviousActivityDestroying.Set(); // call at the end to avoid race conditions with Platform dispose base.OnDestroy(); }