From: Eunki, Hong Date: Mon, 10 Jun 2024 07:21:36 +0000 (+0900) Subject: [NUI][API11] Fix memory leak when DragAndDrop try to get Position X-Git-Tag: submit/tizen_8.0/20240610.151101~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b00f9643a9b562d0d437e9e7c9c465ddc770b929;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][API11] Fix memory leak when DragAndDrop try to get Position Since DragEvent's GetPosition return new Vector2 class internally, we should keep the positoin with memory ownership. Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs index 2d3ae1803..c2ad8a358 100755 --- a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs +++ b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs @@ -189,7 +189,7 @@ namespace Tizen.NUI DragType type = (DragType)Interop.DragAndDrop.GetAction(dragEvent); DragEvent ev = new DragEvent(); global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(dragEvent); - ev.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false); + ev.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, true); if (type == DragType.Enter) {