Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit fd4f6e1

Browse files
committed
[Ide] Properly dispose WizardDialog on completion
1 parent 8eb5644 commit fd4f6e1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Wizard/WizardDialogController.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,16 @@ public async Task GoBack (CancellationToken token)
125125

126126
public bool RunWizard ()
127127
{
128-
var dialog = new WizardDialog (this);
129-
return dialog.Run (Xwt.MessageDialog.RootWindow);
128+
using (var dialog = new WizardDialog (this)) {
129+
return dialog.Run (Xwt.MessageDialog.RootWindow);
130+
}
130131
}
131132

132133
public bool RunWizard (Xwt.WindowFrame parentWindow)
133134
{
134-
var dialog = new WizardDialog (this);
135-
return dialog.Run (parentWindow);
135+
using (var dialog = new WizardDialog (this)) {
136+
return dialog.Run (parentWindow);
137+
}
136138
}
137139

138140
public event EventHandler Completed;

0 commit comments

Comments
 (0)