summaryrefslogtreecommitdiff
path: root/grapher/Models
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-09-13 23:00:53 -0400
committera1xd <[email protected]>2021-09-23 22:34:51 -0400
commit138ddb54e42e71a384e059afe69e4e8172935d6d (patch)
treed3640e1f92ad92ec09583defdbb893934c7489c3 /grapher/Models
parentadd fn for making a shortcut in startup folder (diff)
downloadrawaccel-138ddb54e42e71a384e059afe69e4e8172935d6d.tar.xz
rawaccel-138ddb54e42e71a384e059afe69e4e8172935d6d.zip
fix potential leaks
forms displayed with ShowDialog are only hidden when closed; Dispose must be called manually
Diffstat (limited to 'grapher/Models')
-rw-r--r--grapher/Models/AccelGUI.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs
index e15aba9..1836b65 100644
--- a/grapher/Models/AccelGUI.cs
+++ b/grapher/Models/AccelGUI.cs
@@ -154,7 +154,10 @@ namespace grapher
error_message = e.Message;
}
- new MessageDialog(error_message, "bad input").ShowDialog();
+ using (var form = new MessageDialog(error_message, "bad input"))
+ {
+ form.ShowDialog();
+ }
}
public void RefreshActive()