/*
- * 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.
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");
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<std::string>(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);