[3.0] Change Internal::Control destructor to protected 37/100237/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 24 Nov 2016 17:43:40 +0000 (17:43 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 25 Nov 2016 10:38:38 +0000 (02:38 -0800)
This is a ref-counted object so another object should not be able to delete it.

Change-Id: I05d2d262f509380586584acfa1fb6646fe1ba688

dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h

index a47875a..b6ea20b 100644 (file)
@@ -415,11 +415,6 @@ Toolkit::Control Control::New()
   return handle;
 }
 
-Control::~Control()
-{
-  delete mImpl;
-}
-
 void Control::SetStyleName( const std::string& styleName )
 {
   if( styleName != mImpl->mStyleName )
@@ -708,6 +703,11 @@ Control::Control( ControlBehaviour behaviourFlags )
   mImpl->mFlags = behaviourFlags;
 }
 
+Control::~Control()
+{
+  delete mImpl;
+}
+
 void Control::Initialize()
 {
   // Call deriving classes so initialised before styling is applied to them.
index 59e10d9..d185f7e 100644 (file)
@@ -69,12 +69,6 @@ public:
    */
   static Toolkit::Control New();
 
-  /**
-   * @brief Virtual destructor.
-   * @SINCE_1_0.0
-   */
-  virtual ~Control();
-
   // Styling
 
   /**
@@ -433,6 +427,12 @@ protected: // Helpers for deriving classes
   Control( ControlBehaviour behaviourFlags );
 
   /**
+   * @brief Virtual destructor.
+   * @SINCE_1_0.0
+   */
+  virtual ~Control();
+
+  /**
    * @brief Second phase initialization.
    * @SINCE_1_0.0
    */