From: minho.sun Date: Wed, 7 Jun 2017 05:54:56 +0000 (+0900) Subject: [Tizen] Fix memory leak issue in dali core X-Git-Tag: accepted/tizen/unified/20170608.072246^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=cd1f8c935c88054e546c76834f077ba6677facb5;hp=3d6dca0c017d06d048f479e92ff0eecb0dd6fb69 [Tizen] Fix memory leak issue in dali core This reverts commit 4ad6cb8b91998fd9affe0f185491f76b595c4b74. Change-Id: I7666fee4e382983e0e83df255ccca796cdaf7f83 --- diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp old mode 100644 new mode 100755 index 2ab1558..4ad7d29 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -2446,6 +2446,7 @@ void Actor::RebuildDepthTree() SetDepthIndicesMessage( GetEventThreadServices().GetUpdateManager(), sceneGraphNodeDepths ); DALI_LOG_TIMER_END(depthTimer, gLogFilter, Debug::Concise, "Depth tree create time: "); + rootNode->~ActorDepthTreeNode(); } /** diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h old mode 100644 new mode 100755 index b7e177d..e0f200f --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -2008,15 +2008,17 @@ public: { if( mFirstChildNode ) { - delete mFirstChildNode; + mFirstChildNode->~ActorDepthTreeNode(); mFirstChildNode = NULL; } if( mNextSiblingNode ) { - delete mNextSiblingNode; + mNextSiblingNode->~ActorDepthTreeNode(); mNextSiblingNode = NULL; } mParentNode = NULL; + + mActors.clear(); } uint16_t GetSiblingOrder() diff --git a/dali/internal/update/manager/update-manager.cpp b/dali/internal/update/manager/update-manager.cpp old mode 100644 new mode 100755 index 344891a..c6d67ea --- a/dali/internal/update/manager/update-manager.cpp +++ b/dali/internal/update/manager/update-manager.cpp @@ -1053,6 +1053,7 @@ void UpdateManager::SetDepthIndices( NodeDepths* nodeDepths ) { iter->node->SetDepthIndex( iter->sortedDepth ); } + delete nodeDepths; } }