private void HandleTouchUpInside(object sender, EventArgs e) { Console.WriteLine ("HandleTouchUpInside"); /* // Dont leak UIView v1 = new UIView (); UIView v2 = new UIView (); */ /* // Dont leak UIView v1 = new DebugView (); UIView v2 = new UIView (); */ /* // Leak UIView v1 = new UIView (); UIView v2 = new DebugView (); */ // Leak UIView v1 = new DebugView (); UIView v2 = new DebugView (); v1.AddSubview (v2); View.AddSubview (v1); var sv = v2.Superview; // cause of leak //v2.ResetSuperViewChache (); // uncomment to fix v1.RemoveFromSuperview (); }