protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_viewController != null) { _viewController.View.RemoveFromSuperview(); _viewController.RemoveFromParentViewController(); _viewController.Dispose(); _viewController = null; } if (_mainWindow != null) { _mainWindow.Dispose(); _mainWindow = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (_viewController != null) { _viewController.View.RemoveFromSuperview(); _viewController.RemoveFromParentViewController(); _viewController.Dispose(); _viewController = null; } #region Modification 24-05-2014 // MonoGame is no longer responsible for closing our window. //if (_mainWindow != null) //{ // _mainWindow.Dispose (); // _mainWindow = null; //} #endregion } }