释放动画资源
authorCaisking <3449750381@qq.com>
Tue, 19 Dec 2023 11:34:28 +0000 (19:34 +0800)
committerCaisking <3449750381@qq.com>
Tue, 19 Dec 2023 11:34:28 +0000 (19:34 +0800)
code/sdk/application/wearable/nativeapp/nativeui/clock/src/MainClockView.cpp

index bb09d0f..7a59949 100755 (executable)
@@ -86,6 +86,11 @@ MainClockView::~MainClockView()
         delete clockAnimator;
         clockAnimator = nullptr;
     }
+    if(progress1animator_ != nullptr) {
+        progress1animator_->Stop();
+        delete progress1animator_;
+        progress1animator_ = nullptr;
+    }
     mainSweepClock->RemoveAll();
      
     delete batteryLabel;
@@ -564,7 +569,7 @@ bool MainClockView::InitView(void)
         return false;
     }
     progress1callback_ = new ProgressCallback(progress,batteryLabel);
-    progress1animator_ = new Animator(progress1callback_,progress,100,true);
+    progress1animator_ = new Animator(progress1callback_,progress,5000,true);
     progress1animator_->Start();
     clockAnimator->Start();
     SetCoverable(true);