From: Caisking <3449750381@qq.com> Date: Thu, 5 Sep 2024 07:10:46 +0000 (+0800) Subject: 取消多余的遥控拍照的资源释放 X-Git-Tag: release_V1.2.70_20241020_135402~518^2~32 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=6c2733b2c884aabaa99aab90fc7aaa2444617c3c;p=mirrors%2FFD230.git 取消多余的遥控拍照的资源释放 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/takephotos/src/TakephotosView.cpp b/code/sdk/application/wearable/fd230app/nativeui/takephotos/src/TakephotosView.cpp index e998433ce..79eea0918 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/takephotos/src/TakephotosView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/takephotos/src/TakephotosView.cpp @@ -29,13 +29,19 @@ namespace OHOS TakephotosView::~TakephotosView() { // DeInit(); - creamAnimator->Stop(); - smileAnimator->Stop(); - FreeImageInfoArray(creamimageInfos, creambasePath.c_str(), 50); - FreeImageInfoArray(smileimageInfos, smilebasePath.c_str(), 50); - ReleaseImageAnimatorSource(creamimageAnimatorInfo, 50); + PopupPhoto staust = TakephotosModel::GetInstance()->GetPopStaust(); + if (staust == PopupPhoto::CreamPopup) + { + creamAnimator->Stop(); + FreeImageInfoArray(creamimageInfos, creambasePath.c_str(), 50); + } + else + { + smileAnimator->Stop(); + FreeImageInfoArray(smileimageInfos, smilebasePath.c_str(), 50); + } ReleaseImageAnimatorSource(smileimageAnimatorInfo, 50); - + ReleaseImageAnimatorSource(creamimageAnimatorInfo, 50); UIViewGroup *tmpGroup = dynamic_cast(container_); UIViewGroup::RemoveAndDeleteAllRecursively(tmpGroup);