[NUI] Fix build warnings: use the new keyword
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / Popup.cs
index 395ab74..9d64b47 100755 (executable)
@@ -63,10 +63,6 @@ namespace Tizen.NUI.UIComponents
                 if (swigCMemOwn)
                 {
                     swigCMemOwn = false;
-
-                    //Unreference this instance from Registry.
-                    Registry.Unregister(this);
-
                     NDalicPINVOKE.delete_Popup(swigCPtr);
                 }
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
@@ -319,7 +315,7 @@ namespace Tizen.NUI.UIComponents
             }
         }
 
-        internal class Property
+        internal new class Property
         {
             internal static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get();
             internal static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get();
@@ -356,7 +352,7 @@ namespace Tizen.NUI.UIComponents
         [Obsolete("Please do not use! this will be deprecated")]
         public new static Popup DownCast(BaseHandle handle)
         {
-            Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true);
+            Popup ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as Popup;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -373,7 +369,9 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetTitle()
         {
-            View ret = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true);
+            IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -390,7 +388,9 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetContent()
         {
-            View ret = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true);
+            IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -407,7 +407,9 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetFooter()
         {
-            View ret = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true);
+            IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }