[NUI] make BaseHandle.Reset() not work
authordongsug.song <dongsug.song@samsung.com>
Fri, 16 Dec 2022 07:01:02 +0000 (16:01 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 23 Dec 2022 05:08:56 +0000 (14:08 +0900)
- this came from native dali and it is not propriate for nui.
- it makes BaseHandle's reference count as 0, but this action could cause memory leak in nui side.
- in nui side, calling Dispose() explicitly or doing nothing to delegate disposing action to the DisposeQueue is recommended.

src/Tizen.NUI/src/internal/Interop/Interop.BaseHandle.cs
src/Tizen.NUI/src/public/Common/BaseHandle.cs

index 2dffde1..749296a 100755 (executable)
@@ -47,9 +47,6 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BaseHandle_GetBaseObject__SWIG_0")]
             public static extern global::System.IntPtr GetBaseObject(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BaseHandle_Reset")]
-            public static extern void Reset(global::System.Runtime.InteropServices.HandleRef jarg1);
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BaseHandle_EqualTo")]
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool EqualTo(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
index d611bfb..71f81e9 100755 (executable)
@@ -432,10 +432,12 @@ namespace Tizen.NUI
         /// Resets the handle.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        /// <remark>
+        /// This will be deprecated in next version, please use Dipose() instead.
+        /// </remark>
         public void Reset()
         {
-            Interop.BaseHandle.Reset(swigCPtrCopy);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            NUILog.Error("[ERROR] This(BaseHandle.Reset) will be deprecated, please use Dispose() instead!");
         }
 
         /// <summary>