Dispose() 보호된 메소드

Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only unmanaged resources.
리턴 void
예제 #1
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing,
        /// releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            if (!disposed)
            {
                bw.DoWork             -= bw_DoWork;
                bw.RunWorkerCompleted -= bw_RunWorkerCompleted;

                bw.Dispose();

                disposed = true;

                GC.SuppressFinalize(this);
            }
        }