protected override void Dispose(bool disposing) { //sfPopUp.DismissPopup(true); if (backgroundView != null) { mainView.WillRemoveSubview(backgroundView); mainView.SendSubviewToBack(backgroundView); sfPopUp.RemoveFromSuperview(); backgroundView.BackgroundColor = UIColor.Brown; backgroundView.UserInteractionEnabled = false; backgroundView.Frame = new CGRect(0, 0, 0, 0); backgroundView.RemoveFromSuperview(); nextButton.RemoveFromSuperview(); backgroundView = null; } base.Dispose(disposing); if (SfGrid != null) { SfGrid.Dispose(); } if (sfPopUp != null) { sfPopUp.Dispose(); } mainView = null; }