From: hcj <1224667075@qq.com> Date: Thu, 25 Jul 2024 06:40:21 +0000 (+0800) Subject: 修复通讯录内存泄漏 X-Git-Tag: release_V1.2.70_20241020_135402~702^2~5 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F585%2F2;p=mirrors%2FFD230.git 修复通讯录内存泄漏 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/MainPhoneView.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/MainPhoneView.cpp index 2206cb09d..8bc372e27 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/MainPhoneView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/MainPhoneView.cpp @@ -110,6 +110,11 @@ namespace OHOS button_calllog_status[i] = nullptr; } } + if(info) + { + delete info; + info=nullptr; + } if(hintCallsLabel) { @@ -247,7 +252,8 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CallerLogModel::GetInstance()->ListIsEmpty"); return; } - + if(num>20) + num=20; MainPhoneView_ButtonConfig_ext_t buttonconfig; buttonconfig.x = 38; buttonconfig.y = 360;