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
Beispiel #1
0
        private void linkOpenFile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                var gifPreviewer = new GifPreviewer(_fileName);
                gifPreviewer.ShowDialog();

                gifPreviewer.Dispose();
            }
            catch (Exception exception)
            {
                //TODO: Tooltip.
                LogWriter.Log(exception, "Missing File");
                MessageBox.Show(this, Resources.MsgBox_ErrorOpenning + exception.Message, "Missing File", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #2
0
        private void linkOpenFile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                var gifPreviewer = new GifPreviewer(_fileName);
                gifPreviewer.ShowDialog();

                gifPreviewer.Dispose();
            }
            catch (Exception exception)
            {
                //TODO: Tooltip.
                LogWriter.Log(exception, "Missing File");
                MessageBox.Show(this, Resources.MsgBox_ErrorOpenning + exception.Message, "Missing File", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }