[NUI] Make DisposeRecursively() full search of children list even if Disposed
authorEunki Hong <eunkiki.hong@samsung.com>
Wed, 21 Feb 2024 16:05:10 +0000 (01:05 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Wed, 20 Mar 2024 11:19:40 +0000 (20:19 +0900)
There was guad code when we traversal children list.
There was some bugs when we traversal disposed item. But now, this bug is not happend.

To make the behavior match with comment, let we recursive the tree even if self is disposed.

Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/Common/Container.cs

index 73727da..baef8eb 100755 (executable)
@@ -268,10 +268,7 @@ namespace Tizen.NUI
 
             foreach (View child in copiedChildren)
             {
-                if (!(child?.Disposed ?? true))
-                {
-                    child.DisposeRecursively();
-                }
+                child?.DisposeRecursively();
             }
         }