Permalink
Browse files

Add more Dispose methods to options panels to prevent hang on shutdown

  • Loading branch information...
1 parent d902e06 commit d4cb8d6e5a6503a6a148e5619fbb0bf614d87a4a @scottstephens committed May 3, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/FSharpOptionsPanels.fs
@@ -114,6 +114,10 @@ type CodeGenerationPanel() =
inherit MultiConfigItemOptionsPanel()
let mutable widget : FSharpCompilerOptionsWidget = null
+ override x.Dispose() =
+ if widget <> null then
+ widget.Dispose()
+
override x.CreatePanelWidget() =
widget <- new FSharpCompilerOptionsWidget()
widget.Show()
@@ -162,6 +166,10 @@ type BuildOrderPanel() =
let cell = new Gtk.CellRendererText();
col.PackStart(cell, true);
col.AddAttribute(cell, "text", 0);
+
+ override x.Dispose() =
+ if widget <> null then
+ widget.Dispose()
override x.LoadConfigData() =
let config = x.CurrentConfiguration :?> DotNetProjectConfiguration

0 comments on commit d4cb8d6

Please sign in to comment.