优化clock的析构
authorCaisking <Casiking@zhihuishixun.com>
Mon, 22 Dec 2025 08:22:50 +0000 (16:22 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Mon, 22 Dec 2025 08:22:50 +0000 (16:22 +0800)
code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/clock/src/MainClockView.cpp
code/sdk/application/wearable/n9/nativeapp/nativeui/clock/src/MainClockView.cpp

index da20658..4733bbc 100644 (file)
      MainClockView::~MainClockView()
      {
          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainClockView::~MainClockView");
- 
+         
+         RemoveAll();
+
          delete curFace; // 背景
          curFace = nullptr;
          delete timerlabel; // 时间
index da20658..f6da6e1 100644 (file)
      MainClockView::~MainClockView()
      {
          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainClockView::~MainClockView");
- 
+         
+         RemoveAll();
+
          delete curFace; // 背景
          curFace = nullptr;
          delete timerlabel; // 时间
              WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitClock is error");
              return false;
          }
-         InitDateTime(); // 初始化数据
+        //  InitDateTime(); // 初始化数据
          SetCoverable(true);
          return true;
      }
index 7734021..7a0969d 100644 (file)
      MainClockView::~MainClockView()
      {
          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainClockView::~MainClockView");
- 
+         
+         RemoveAll();
+
          delete curFace; // 背景
          curFace = nullptr;
          delete timerlabel; // 时间