[NUI] No need to do Registry.GetManagedBaseHandleFromNativePtr().
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 5 Nov 2020 02:26:47 +0000 (11:26 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 5 Nov 2020 02:32:56 +0000 (11:32 +0900)
src/Tizen.NUI/src/public/Gesture.cs
src/Tizen.NUI/src/public/Hover.cs
src/Tizen.NUI/src/public/Key.cs
src/Tizen.NUI/src/public/LongPressGesture.cs
src/Tizen.NUI/src/public/PanGesture.cs
src/Tizen.NUI/src/public/PinchGesture.cs
src/Tizen.NUI/src/public/RotationGesture.cs
src/Tizen.NUI/src/public/TapGesture.cs
src/Tizen.NUI/src/public/Wheel.cs

index ac418dc..a1c9e10 100755 (executable)
@@ -195,11 +195,7 @@ namespace Tizen.NUI
 
         internal static Gesture GetGestureFromPtr(global::System.IntPtr cPtr)
         {
-            Gesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Gesture;
-            if (ret == null)
-            {
-                ret = new Gesture(cPtr, false);
-            }
+            Gesture ret = new Gesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 48ca24b..53fffb2 100755 (executable)
@@ -159,12 +159,7 @@ namespace Tizen.NUI
 
         internal static Hover GetHoverFromPtr(global::System.IntPtr cPtr)
         {
-            Hover ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Hover;
-            if (ret == null)
-            {
-                ret = new Hover(cPtr, false);
-            }
-
+            Hover ret = new Hover(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 07dd8eb..daa7fbc 100755 (executable)
@@ -324,11 +324,7 @@ namespace Tizen.NUI
 
         internal static Key GetKeyFromPtr(global::System.IntPtr cPtr)
         {
-            Key ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Key;
-            if (ret == null)
-            {
-                ret = new Key(cPtr, false);
-            }
+            Key ret = new Key(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index eba8886..8015aac 100755 (executable)
@@ -135,11 +135,7 @@ namespace Tizen.NUI
 
         internal static LongPressGesture GetLongPressGestureFromPtr(global::System.IntPtr cPtr)
         {
-            LongPressGesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as LongPressGesture;
-            if (ret == null)
-            {
-                ret = new LongPressGesture(cPtr, false);
-            }
+            LongPressGesture ret = new LongPressGesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 78e4c36..d0576e0 100755 (executable)
@@ -326,11 +326,7 @@ namespace Tizen.NUI
 
         internal static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr)
         {
-            PanGesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as PanGesture;
-            if (ret == null)
-            {
-                ret = new PanGesture(cPtr, false);
-            }
+            PanGesture ret = new PanGesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index fae237d..27d4ab5 100755 (executable)
@@ -163,11 +163,7 @@ namespace Tizen.NUI
 
         internal static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr)
         {
-            PinchGesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as PinchGesture;
-            if (ret == null)
-            {
-                ret = new PinchGesture(cPtr, false);
-            }
+            PinchGesture ret = new PinchGesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index 8110927..219ec9b 100755 (executable)
@@ -137,11 +137,7 @@ namespace Tizen.NUI
 
         internal static RotationGesture GetRotationGestureFromPtr(global::System.IntPtr cPtr)
         {
-            RotationGesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as RotationGesture;
-            if (ret == null)
-            {
-                ret = new RotationGesture(cPtr, false);
-            }
+            RotationGesture ret = new RotationGesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index aa5b9fd..1f23710 100755 (executable)
@@ -161,11 +161,7 @@ namespace Tizen.NUI
         /// <returns>The TapGesture object.</returns>
         internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
         {
-            TapGesture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TapGesture;
-            if (ret == null)
-            {
-                ret = new TapGesture(cPtr, false);
-            }
+            TapGesture ret = new TapGesture(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
index adb0230..18edfea 100755 (executable)
@@ -253,11 +253,7 @@ namespace Tizen.NUI
 
         internal static Wheel GetWheelFromPtr(global::System.IntPtr cPtr)
         {
-            Wheel ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Wheel;
-            if (ret == null)
-            {
-                ret = new Wheel(cPtr, false);
-            }
+            Wheel ret = new Wheel(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }