Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        /// <summary>
        /// Finish tracking all popups.
        /// </summary>
        public void EndAllTracking()
        {
            // Are we tracking a popup?
            if (_current != null)
            {
                // Kill the popup window
                if (!_current.IsDisposed)
                {
                    _current.Dispose();
                    _current = null;
                }

                // Is there anything stacked?
                while (_stack.Count > 0)
                {
                    // Pop back the popup
                    _current = _stack.Pop();

                    // Kill the popup
                    _current.Dispose();
                    _current = null;
                }

                // No longer need to filter
                FilterMessages(false);
            }
        }