From 951848f7d6857045bcf83da949f748da6c40eb7a Mon Sep 17 00:00:00 2001 From: Jiyun Yang Date: Thu, 20 Jul 2023 16:25:53 +0900 Subject: [PATCH] [NUI] Remove RenderTask itself from the RenderTaskList when disposed Signed-off-by: Jiyun Yang --- src/Tizen.NUI/src/internal/Common/RenderTask.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Common/RenderTask.cs b/src/Tizen.NUI/src/internal/Common/RenderTask.cs index 47b8223..0c12607 100755 --- a/src/Tizen.NUI/src/internal/Common/RenderTask.cs +++ b/src/Tizen.NUI/src/internal/Common/RenderTask.cs @@ -41,6 +41,21 @@ namespace Tizen.NUI return ret; } + protected override void Dispose(DisposeTypes type) + { + if (Disposed) + { + return; + } + + foreach (var window in Application.GetWindowList()) + { + window.GetRenderTaskList().RemoveTask(this); + } + + base.Dispose(type); + } + internal class Property { internal static readonly int ViewportPosition = Interop.RenderTask.ViewportPositionGet(); -- 2.7.4