aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Popper.cs
diff options
context:
space:
mode:
authorj-p <jp.bruyere@live.be>2017-08-28 05:12:19 +0200
committerGitHub <noreply@github.com>2017-08-28 05:12:19 +0200
commit1d9aa6aa61da3dd5f1a1a488018ceb8b5a88f2af (patch)
treee7e9aed2ad7b0947855ce9d70a52267b128fec0c /src/GraphicObjects/Popper.cs
parentd6d7eda88ae12d6c47d6c158a5a9527a47447745 (diff)
full IDisposable implementation (#34)
* full implementation of IDisposable, not stable, lock and still leaking * override dispose in popper to handle _content not yet in graphic tree (when never shown), test focusedWidget when disposing * prevent canceling thread multiple times causing a deadlock * test parent type when trying to close window
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
-rw-r--r--src/GraphicObjects/Popper.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs
index 3ba6d711..d6e36346 100644
--- a/src/GraphicObjects/Popper.cs
+++ b/src/GraphicObjects/Popper.cs
@@ -240,5 +240,14 @@ namespace Crow
}
Unpoped.Raise (this, e);
}
+
+ protected override void Dispose (bool disposing)
+ {
+ if (_content != null && disposing) {
+ if (_content.Parent == null)
+ _content.Dispose ();
+ }
+ base.Dispose (disposing);
+ }
}
}