Fix resource leaks in layouting.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / layouting / layout-item-data-impl.h
index 0b415ad..e7b2819 100644 (file)
@@ -16,7 +16,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+#include <dali/public-api/object/weak-handle.h>
 #include <dali-toolkit/devel-api/layouting/layout-item-impl.h>
 #include <dali-toolkit/devel-api/layouting/layout-controller.h>
 #include <dali-toolkit/devel-api/layouting/layout-size.h>
@@ -35,7 +35,7 @@ public:
   Impl();
 
 public:
-  BaseObject* mOwner; ///< Control or Visual that owns this layout. Raw pointer to prevent cyclic references
+  WeakHandle<Handle> mOwner; ///< Control or Visual that owns this layout. Weak pointer to prevent cyclic references
   LayoutParent* mLayoutParent; ///< The containing layout parent.
 
   MeasureSpec mOldWidthMeasureSpec;