Skip to content

Commit 286fec7

Browse files
authoredMay 28, 2022
Explicitly dispose old TreeView instances in UICatalog scenario (#1749)
Fixes #1742
1 parent 2971fc9 commit 286fec7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎UICatalog/Scenarios/TreeUseCases.cs

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private void LoadRooms ()
7575

7676
if (currentTree != null) {
7777
Win.Remove (currentTree);
78+
currentTree.Dispose ();
7879
}
7980

8081

@@ -148,6 +149,7 @@ private void LoadArmies (bool useDelegate)
148149

149150
if (currentTree != null) {
150151
Win.Remove (currentTree);
152+
currentTree.Dispose ();
151153
}
152154

153155

@@ -180,6 +182,7 @@ private void LoadSimpleNodes ()
180182
{
181183
if (currentTree != null) {
182184
Win.Remove (currentTree);
185+
currentTree.Dispose ();
183186
}
184187

185188

0 commit comments

Comments
 (0)
Please sign in to comment.