Example #1
0
        /// <summary>
        /// Release unmanaged and optionally managed resources.
        /// </summary>
        /// <param name="disposing">Called from Dispose method.</param>
        protected override void Dispose(bool disposing)
        {
            // If called from explicit call to Dispose
            if (disposing)
            {
                if (_viewControl != null)
                {
                    try
                    {
                        ViewControl vc = _viewControl;
                        _viewControl = null;
                        CommonHelper.RemoveControlFromParent(vc);
                    }
                    catch { }
                }

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

            base.Dispose(disposing);
        }
Example #2
0
 /// <summary>
 /// Clean up any resources.
 /// </summary>
 public virtual void Dispose()
 {
     // Dispose of the associated element hierarchy
     if (_root != null)
     {
         _root.Dispose();
     }
 }
Example #3
0
 /// <summary>
 /// Release unmanaged and optionally managed resources.
 /// </summary>
 /// <param name="disposing">Called from Dispose method.</param>
 protected override void Dispose(bool disposing)
 {
     // If called from explicit call to Dispose
     if (disposing)
     {
         if (_child != null)
         {
             _child.Dispose();
             _child = null;
         }
     }
 }
 /// <summary>
 /// Clean up any resources.
 /// </summary>
 public virtual void Dispose()
 {
     // Dispose of the associated element hierarchy
     _root?.Dispose();
 }