Browse Source

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

Fixes #1742
Thomas Nind 3 năm trước cách đây
mục cha
commit
286fec7990
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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 ();
 			}