Ejemplo n.º 1
0
 public override void DidReceiveMemoryWarning()
 {
     base.DidReceiveMemoryWarning();
     if (acmField != null)
     {
         if (acmField.InputView != null)
         {
             acmField.InputView.Dispose();
             acmField.InputView = null;
         }
         if (acmField.InputAccessoryView != null)
         {
             acmField.InputAccessoryView.Dispose();
             acmField.InputAccessoryView = null;
         }
     }
     foreach (var item in HighlightDropdown.ItemsSource)
     {
         ((NSObject)item).Dispose();
     }
     foreach (var item in CustomDropdown.ItemsSource)
     {
         ((NSObject)item).Dispose();
     }
     HighlightDropdown.RemoveFromSuperview();
     CustomDropdown.RemoveFromSuperview();
     FilterDropdown.RemoveFromSuperview();
     ReleaseDesignerOutlets();
 }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (acmField != null)
            {
                acmField.Dispose();
                acmField = null;
            }

            if (AutoCompleteMode != null)
            {
                AutoCompleteMode.Dispose();
                AutoCompleteMode = null;
            }

            if (clearSwitch != null)
            {
                clearSwitch.Dispose();
                clearSwitch = null;
            }

            if (CustomDropdown != null)
            {
                CustomDropdown.Dispose();
                CustomDropdown = null;
            }

            if (FilterDropdown != null)
            {
                FilterDropdown.Dispose();
                FilterDropdown = null;
            }

            if (HighlightDropdown != null)
            {
                HighlightDropdown.Dispose();
                HighlightDropdown = null;
            }

            if (ShowClearButton != null)
            {
                ShowClearButton.Dispose();
                ShowClearButton = null;
            }
        }