From cd1f8c935c88054e546c76834f077ba6677facb5 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Wed, 7 Jun 2017 14:54:56 +0900 Subject: [PATCH] [Tizen] Fix memory leak issue in dali core This reverts commit 4ad6cb8b91998fd9affe0f185491f76b595c4b74. Change-Id: I7666fee4e382983e0e83df255ccca796cdaf7f83 --- dali/internal/event/actors/actor-impl.cpp | 1 + dali/internal/event/actors/actor-impl.h | 6 ++++-- dali/internal/update/manager/update-manager.cpp | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) mode change 100644 => 100755 dali/internal/event/actors/actor-impl.cpp mode change 100644 => 100755 dali/internal/event/actors/actor-impl.h mode change 100644 => 100755 dali/internal/update/manager/update-manager.cpp 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; } } -- 2.7.4