Skip to content

Commit

Permalink
[NUI] Remove RenderTask itself from the RenderTaskList when disposed
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyun Yang <[email protected]>
  • Loading branch information
rabbitfor committed Jul 20, 2023
1 parent 11e1946 commit 169914b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Tizen.NUI/src/internal/Common/RenderTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public static RenderTask GetRenderTaskFromPtr(global::System.IntPtr cPtr)
return ret;
}

protected override void Dispose(DisposeTypes type)
{
if (Disposed)
{
return;
}

Window.Instance.GetRenderTaskList().RemoveTask(this);

Check warning on line 51 in src/Tizen.NUI/src/internal/Common/RenderTask.cs

View workflow job for this annotation

GitHub Actions / build

Call System.IDisposable.Dispose on object created by 'Window.Instance.GetRenderTaskList()' before all references to it are out of scope.

base.Dispose(type);
}

internal class Property
{
internal static readonly int ViewportPosition = Interop.RenderTask.ViewportPositionGet();
Expand Down

0 comments on commit 169914b

Please sign in to comment.