Beispiel #1
0
        /// <summary>
        /// Disposes the object.
        /// </summary>
        public void Dispose()
        {
            if (IsDisposed)
            {
                return;
            }

            WindowsAPI.DestroyWindow(MessageWindowHandle);
            _messageHandler = null;

            IsDisposed = true;

            // This object will be cleaned up by the Dispose method.
            // Therefore, we call GC.SupressFinalize to take this object off the finalization queue
            // and prevent finalization code for this object from executing a second time.
            GC.SuppressFinalize(this);
        }