diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2011-08-15 09:58:07 +0400 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2011-08-15 10:05:19 +0400 |
commit | d5f1049fb7748f21649a637a3d114d60724964b0 (patch) | |
tree | 856d9d625f7aa151d45fc71948227d7ba6c7a116 | |
parent | 40c20ea636b87a75a572f3f99cd0416a1e6058b3 (diff) |
[Windows] Dispose the encoding selection form when done.
-rw-r--r-- | main/src/addins/WindowsPlatform/Dialogs/EncodingComboBox.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/src/addins/WindowsPlatform/Dialogs/EncodingComboBox.cs b/main/src/addins/WindowsPlatform/Dialogs/EncodingComboBox.cs index 3966ec20bb..2c05573cd3 100644 --- a/main/src/addins/WindowsPlatform/Dialogs/EncodingComboBox.cs +++ b/main/src/addins/WindowsPlatform/Dialogs/EncodingComboBox.cs @@ -101,10 +101,11 @@ namespace MonoDevelop.Platform // 'Add or Remove...' option
if (Items.Count > 0 && SelectedIndex == Items.Count -1) {
- var encodingsForm = new EncodingSelectionForm ();
- if (encodingsForm.ShowDialog (Parent) == DialogResult.OK) {
- TextEncoding.ConversionEncodings = encodingsForm.SelectedEncodings;
- Populate (true);
+ using (var encodingsForm = new EncodingSelectionForm ()) {
+ if (encodingsForm.ShowDialog (Parent) == DialogResult.OK) {
+ TextEncoding.ConversionEncodings = encodingsForm.SelectedEncodings;
+ Populate (true);
+ }
}
SelectedIndex = 0;
|