[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 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;
             }
         }