Skip to content

Commit

Permalink
[NUI] Make DaliAccessibilityDetachAccessibleObject called at main thread
Browse files Browse the repository at this point in the history
void Dispose(bool) can be called from worker thread, when disposing value is false.

To ensure we detach AccessibileObject in main thread, let we remove it
at Dispose(DisposeTypes), instead of Dispose(bool)

Signed-off-by: Eunki, Hong <[email protected]>
  • Loading branch information
Eunki, Hong committed Oct 30, 2023
1 parent 70ddb0e commit 8b4a503
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ protected override void Dispose(DisposeTypes type)
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(bool disposing)
{
// Note : We can clean dictionaries even this API called from GC Thread.
CleanCallbackDictionaries();
base.Dispose(disposing);
}
Expand Down
3 changes: 0 additions & 3 deletions src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,6 @@ protected override void Dispose(bool disposing)

internalName = null;

Interop.ControlDevel.DaliAccessibilityDetachAccessibleObject(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();

if (disposing == false)
{
if (IsNativeHandleInvalid() || SwigCMemOwn == false)
Expand Down
3 changes: 3 additions & 0 deletions src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,9 @@ protected override void Dispose(DisposeTypes type)

disposeDebugging(type);

Interop.ControlDevel.DaliAccessibilityDetachAccessibleObject(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();

//_mergedStyle = null;

internalMaximumSize?.Dispose();
Expand Down

0 comments on commit 8b4a503

Please sign in to comment.