Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void
Пример #1
0
        private void generateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Save();

            GenerationDialog dialog = new GenerationDialog(resourceDirectory);

            dialog.ShowDialog(this);

            dialog.Dispose();
        }
Пример #2
0
        private void generateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Save();

            GenerationDialog dialog = new GenerationDialog(resourceDirectory);

            dialog.ShowDialog(this);

            dialog.Dispose();
        }