modify release sequence
authorHyeJin Lee <hyejin79.lee@samsung.com>
Mon, 15 Jul 2013 08:35:54 +0000 (17:35 +0900)
committerHyeJin Lee <hyejin79.lee@samsung.com>
Mon, 15 Jul 2013 08:35:54 +0000 (17:35 +0900)
Change-Id: I510b8027ace4aa8e3c7736001a98a80b6f34f775

src/ui/animations/FUiAnim_AnimationManager.cpp

index f93b060..e218e89 100644 (file)
@@ -132,19 +132,12 @@ _AnimationManager::_AnimationManager(void)
        , __pDefaultTimingFunction(null)
        , __pDefaultInterpolator(null)
 {
-       __committedList.Construct();
+
 }
 
 _AnimationManager::~_AnimationManager(void)
 {
-       if (__pCurrentTransaction)
-       {
-               delete __pCurrentTransaction;
-               __pCurrentTransaction = null;
-       }
 
-       __committedList.RemoveAllNodes();
-       __pInstance = null;
 }
 
 _AnimationManager*
@@ -196,6 +189,14 @@ _AnimationManager::Release(void)
                pAnimator = null;
        }
 
+       if (__pCurrentTransaction)
+       {
+               delete __pCurrentTransaction;
+               __pCurrentTransaction = null;
+       }
+
+       __committedList.RemoveAllNodes();
+
        delete __pRootTransaction;
        __pRootTransaction = null;
 
@@ -216,6 +217,8 @@ _AnimationManager::Construct(void)
 {
        result r = E_SUCCESS;
 
+       __committedList.Construct();
+
        __pRootTransaction = new (std::nothrow) _TransactionNode();
        SysTryReturnResult(NID_UI_ANIM, (__pRootTransaction != null), E_OUT_OF_MEMORY, "Memory allocation failed. Failed to create root transaction");
 
@@ -339,7 +342,7 @@ _AnimationManager::RemoveAnimation(VisualElement& target, const Tizen::Base::Str
                {
                        pNode = __committedList.GetNodeAt(index);
 
-                       if (pNode)
+                       if (pNode)__pRootTransaction
                        {
                                r = pNode->RemoveChildrenAnimation(target, keyName);