From: hcj <1224667075@qq.com> Date: Thu, 20 Jun 2024 07:00:31 +0000 (+0800) Subject: 修复目标界面析构BUG X-Git-Tag: release_V1.2.70_20241020_135402~975^2^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F330%2Fhead;p=mirrors%2FFD230.git 修复目标界面析构BUG --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/Maingoalview.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/Maingoalview.cpp index a92501df4..8a1cebbf2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/Maingoalview.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/Maingoalview.cpp @@ -42,6 +42,12 @@ namespace OHOS delete goalView; goalView = nullptr; + delete goalotherView; + goalotherView = nullptr; + + delete goalhintView; + goalhintView = nullptr; + delete goalSwipeViewList; goalSwipeViewList = nullptr; diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp index 263c18df8..414047a75 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp @@ -57,7 +57,7 @@ namespace OHOS void GoalView::ClearAll() { - RemoveAll(); + RemoveAll(); if (circleProgress1_ != nullptr) { delete circleProgress1_; @@ -80,6 +80,7 @@ namespace OHOS } if (stepAnimatorView != nullptr) { + stepAnimatorView->Stop(); delete stepAnimatorView; stepAnimatorView = nullptr; } @@ -91,13 +92,12 @@ namespace OHOS } if (circleProgressimage != nullptr) { - delete circleProgressimage; circleProgressimage = nullptr; } FreeImagePathsArray(PullUpPathsArray, PULLUP_ANIMATOR_VIEW_NUM_FRAMES); - FreeImagePathsArray(PullUpPathsArray, 20); + FreeImagePathsArray(goalPathsArray, 20); }