X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Fdevel-api%2Flayouting%2Fflex-node.cpp;h=8a7dae68ff1da6630407c0da8927d2afdf65f8a8;hb=40455b5d07b94320ec953a906f861bd9d6a367f4;hp=aa46e6f4115c85ed71738c9d9f2a69a9a6749fd4;hpb=f11be450471738b68f98fa4c552b3a22482ae4de;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/layouting/flex-node.cpp b/dali-toolkit/devel-api/layouting/flex-node.cpp index aa46e6f..8a7dae6 100644 --- a/dali-toolkit/devel-api/layouting/flex-node.cpp +++ b/dali-toolkit/devel-api/layouting/flex-node.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,9 +93,12 @@ Node::Node() Node::~Node() { DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Destructor() >> \n"); + // Destruct child Flex::Node first + mImpl->mChildNodes.clear(); + if(mImpl->mYogaNode) { - YGNodeFreeRecursive(mImpl->mYogaNode); + YGNodeFree(mImpl->mYogaNode); mImpl->mYogaNode = nullptr; } DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Destructor() <<\n"); @@ -162,7 +165,7 @@ SizeTuple Node::MeasureNode(float width, int widthMode, float height, int height Toolkit::Flex::SizeTuple nodeSize{8, 8}; // Default size set to 8,8 to aid bug detection. if(mImpl->mMeasureCallback && mImpl->mActor.GetHandle()) { - DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str()); + DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetProperty(Dali::Actor::Property::NAME).c_str()); mImpl->mMeasureCallback(mImpl->mActor.GetHandle(), width, widthMode, height, heightMode, &nodeSize); } DALI_LOG_INFO(gLogFilter, Debug::Verbose, "MeasureNode nodeSize width:%f height:%f\n", nodeSize.width, nodeSize.height);