[NUI][API11] Fix worker thread handle removal issue
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 11 Jun 2024 15:40:23 +0000 (00:40 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Tue, 11 Jun 2024 16:06:56 +0000 (01:06 +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 029b5a6..aa6f91a 100755 (executable)
@@ -210,9 +210,14 @@ 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;
             }
         }