Skip to content

Commit

Permalink
[NUI] Do not register when we try to copy instance
Browse files Browse the repository at this point in the history
Since we register to registry by BaseObjectPtr(), it is impossible to
register duplicated handle.

So, actually, we have to deplicate copy BaseHandle constructor.
But for now, just make we don't register into registry now.

Signed-off-by: Eunki, Hong <[email protected]>
  • Loading branch information
Eunki, Hong committed Oct 30, 2023
1 parent 70ddb0e commit 23efeb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Tizen.NUI/src/public/Common/BaseHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public BaseHandle() : this(Interop.BaseHandle.NewBaseHandle())
/// </summary>
/// <param name="handle">The BaseHandle instance.</param>
/// <since_tizen> 3 </since_tizen>
public BaseHandle(BaseHandle handle) : this(Interop.BaseHandle.NewBaseHandle(BaseHandle.getCPtr(handle)))
public BaseHandle(BaseHandle handle) : this(Interop.BaseHandle.NewBaseHandle(BaseHandle.getCPtr(handle)), handle?.SwigCMemOwn ?? false, false)
{
// Note : Copyed BaseHandle instance don't need to be register in Registry.
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}

Expand Down

0 comments on commit 23efeb0

Please sign in to comment.