From: luozheng <1732036298@qq.com> Date: Mon, 27 Apr 2026 08:21:20 +0000 (+0800) Subject: 解决产测中GPS测试内存泄漏 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F3376%2Ftarget%2F1;p=mirrors%2FFD230.git 解决产测中GPS测试内存泄漏 --- diff --git a/code/sdk/zhihui/UI/producttest/src/testGPS.cpp b/code/sdk/zhihui/UI/producttest/src/testGPS.cpp index 45698c6b8..3f7e0a166 100644 --- a/code/sdk/zhihui/UI/producttest/src/testGPS.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testGPS.cpp @@ -51,6 +51,9 @@ namespace OHOS GPS_TEST_timer = NULL; } + mainContainer->RemoveAll(); + contentScrollView->RemoveAll(); + // 清理固定元素 if(labelButton_next) { @@ -98,7 +101,6 @@ namespace OHOS // 清理滚动内容区域 if(contentScrollView) { - contentScrollView->RemoveAll(); delete contentScrollView; contentScrollView=nullptr; } @@ -106,7 +108,6 @@ namespace OHOS // 清理主容器 if(mainContainer) { - mainContainer->RemoveAll(); delete mainContainer; mainContainer=nullptr; }