From d3decc4731fcc89042eae88a7eeb0d99ccdc84d0 Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Mon, 27 Mar 2017 18:28:21 +0100 Subject: [PATCH] Remove manual memory management from Core implementation. Change-Id: Ibcc99fc9235a8c0f35a14440372d519e2fab7b04 --- dali/internal/common/core-impl.cpp | 15 --------------- dali/internal/common/core-impl.h | 17 +++++++++-------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index dccaacf..0534dd7 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -83,13 +83,6 @@ Core::Core( RenderController& renderController, PlatformAbstraction& platform, GestureManager& gestureManager, ResourcePolicy::DataRetention dataRetentionPolicy) : mRenderController( renderController ), mPlatform(platform), - mGestureEventProcessor(NULL), - mEventProcessor(NULL), - mUpdateManager(NULL), - mRenderManager(NULL), - mDiscardQueue(NULL), - mNotificationManager(NULL), - mShaderFactory(NULL), mIsActive(true), mProcessingEvent(false) { @@ -165,14 +158,6 @@ Core::~Core() // remove (last?) reference to stage mStage.Reset(); - delete mEventProcessor; - delete mGestureEventProcessor; - delete mNotificationManager; - delete mShaderFactory; - delete mDiscardQueue; - delete mUpdateManager; - delete mRenderManager; - delete mRenderTaskProcessor; } Integration::ContextNotifierInterface* Core::GetContextNotifier() diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index d2e4add..17bc172 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -262,20 +262,21 @@ private: Integration::PlatformAbstraction& mPlatform; ///< The interface providing platform specific services. IntrusivePtr mStage; ///< The current stage - GestureEventProcessor* mGestureEventProcessor; ///< The gesture event processor - EventProcessor* mEventProcessor; ///< The event processor - SceneGraph::UpdateManager* mUpdateManager; ///< Update manager - SceneGraph::RenderManager* mRenderManager; ///< Render manager - SceneGraph::DiscardQueue* mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use. - NotificationManager* mNotificationManager; ///< Notification manager AnimationPlaylistOwner mAnimationPlaylist; ///< For 'Fire and forget' animation support OwnerPointer mPropertyNotificationManager; ///< For safe signal emmision of property changed notifications - ShaderFactory* mShaderFactory; ///< Shader resource factory IntrusivePtr< RelayoutController > mRelayoutController; ///< Size negotiation relayout controller - SceneGraph::RenderTaskProcessor* mRenderTaskProcessor; ///< Handles the processing of render tasks bool mIsActive : 1; ///< Whether Core is active or suspended bool mProcessingEvent : 1; ///< True during ProcessEvents() + OwnerPointer mRenderTaskProcessor; ///< Handles the processing of render tasks + OwnerPointer mRenderManager; ///< Render manager + OwnerPointer mUpdateManager; ///< Update manager + OwnerPointer mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use. + OwnerPointer mShaderFactory; ///< Shader resource factory + OwnerPointer mNotificationManager; ///< Notification manager + OwnerPointer mGestureEventProcessor; ///< The gesture event processor + OwnerPointer mEventProcessor; ///< The event processor + friend class ThreadLocalStorage; }; -- 2.7.4