浏览代码

Explicitly dispose old TreeView instances in UICatalog scenario (#1749)

Fixes #1742
Thomas Nind 3 年之前
父节点
当前提交
286fec7990
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      UICatalog/Scenarios/TreeUseCases.cs

+ 3 - 0
UICatalog/Scenarios/TreeUseCases.cs

@@ -75,6 +75,7 @@ namespace UICatalog.Scenarios {
 
 			if (currentTree != null) {
 				Win.Remove (currentTree);
+				currentTree.Dispose ();
 			}
 
 
@@ -148,6 +149,7 @@ namespace UICatalog.Scenarios {
 
 			if (currentTree != null) {
 				Win.Remove (currentTree);
+				currentTree.Dispose ();
 			}
 
 
@@ -180,6 +182,7 @@ namespace UICatalog.Scenarios {
 		{
 			if (currentTree != null) {
 				Win.Remove (currentTree);
+				currentTree.Dispose ();
 			}