[NUI] Fix worker thread handle removal issue
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 11 Jun 2024 15:41:43 +0000 (00:41 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 19 Jun 2024 02:11:12 +0000 (11:11 +0900)
Since `ControlHandle` could be deleted at GC thread, we should use DisposeQueue here.

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

index 029b5a61c9d8c7d8582d35c98bd8b11bc8c4c55c..aa6f91a5f14181246532899873a9df3cec65186e 100755 (executable)
@@ -209,10 +209,15 @@ namespace Tizen.NUI.BaseComponents
             }
 
             protected override bool ReleaseHandle()
+            {
+                DisposeQueue.Instance.Add(this);
+                return true;
+            }
+
+            public void Dispose()
             {
                 Interop.View.DeleteControlHandleView(handle);
                 this.SetHandle(IntPtr.Zero);
-                return true;
             }
         }