Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2015-06-17 00:13:34 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-06-17 00:40:42 +0300
commitbe00174229b0115a88688e639171a98381b20cf8 (patch)
tree86634eeb9abaa2aa3512cb5f94652ec8a76bdb1d /main/src/addins/Deployment/MonoDevelop.Deployment
parentfc3170531a206bddcf4e6011cccfe4a879fa30fa (diff)
[Misc] 1/4 batch of checking disposes of dialogs.
Diffstat (limited to 'main/src/addins/Deployment/MonoDevelop.Deployment')
-rw-r--r--main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DeployOperations.cs7
-rw-r--r--main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DialogFileReplacePolicy.cs4
2 files changed, 6 insertions, 5 deletions
diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DeployOperations.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DeployOperations.cs
index 1f877eef1d..0c69abd6fd 100644
--- a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DeployOperations.cs
+++ b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DeployOperations.cs
@@ -57,9 +57,10 @@ namespace MonoDevelop.Deployment.Gui
public static void ShowPackageSettings (Package package)
{
- EditPackageDialog dlg = new EditPackageDialog (package);
- if (MessageService.ShowCustomDialog (dlg) == (int) Gtk.ResponseType.Ok)
- IdeApp.ProjectOperations.Save (package.ParentProject);
+ using (EditPackageDialog dlg = new EditPackageDialog (package)) {
+ if (MessageService.ShowCustomDialog (dlg) == (int)Gtk.ResponseType.Ok)
+ IdeApp.ProjectOperations.Save (package.ParentProject);
+ }
}
}
}
diff --git a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DialogFileReplacePolicy.cs b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DialogFileReplacePolicy.cs
index 009cb2e770..3d9f2fda4e 100644
--- a/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DialogFileReplacePolicy.cs
+++ b/main/src/addins/Deployment/MonoDevelop.Deployment/MonoDevelop.Deployment.Gui/DialogFileReplacePolicy.cs
@@ -59,8 +59,8 @@ namespace MonoDevelop.Deployment.Gui
//IFileReplacePolicy is not likely to be running in the GUI thread
//so use some DispatchService magic to synchronously call the dialog in the GUI thread
DispatchService.GuiSyncDispatch (delegate {
- var dialog = new FileReplaceDialog (response, source, sourceModified.ToString (), target, targetModified.ToString ());
- response = (FileReplaceDialog.ReplaceResponse) MessageService.ShowCustomDialog (dialog);
+ using (var dialog = new FileReplaceDialog (response, source, sourceModified.ToString (), target, targetModified.ToString ()))
+ response = (FileReplaceDialog.ReplaceResponse) MessageService.ShowCustomDialog (dialog);
});
switch (response) {