diff --git a/services/appmgr/src/cgroup_manager.cpp b/services/appmgr/src/cgroup_manager.cpp index aeb33bfaf2d2ef25f7bacd597f23a257c772ddff..886961a9d43a4cc2159702e7798dafa652e9f27a 100644 --- a/services/appmgr/src/cgroup_manager.cpp +++ b/services/appmgr/src/cgroup_manager.cpp @@ -310,8 +310,8 @@ void CgroupManager::OnReadable(int32_t fd) { APP_LOGW("system low memory alert."); - if (!LowMemoryAlert || LowMemoryAlert) { - APP_LOGW("OnReadable 'LowMemoryAlert' come."); + if (!LowMemoryAlert) { + APP_LOGW("'LowMemoryAlert' not available."); return; } diff --git a/services/appmgr/src/process_optimizer.cpp b/services/appmgr/src/process_optimizer.cpp index 3af3f1c3d8062e3f7acaeb6e1bb31e8413ab4419..534f4cd5df5ef3a33d34a0a6106f08d85d64d772 100644 --- a/services/appmgr/src/process_optimizer.cpp +++ b/services/appmgr/src/process_optimizer.cpp @@ -78,6 +78,8 @@ ProcessOptimizer::ProcessOptimizer(const LmksClientPtr &lmksClient, int suspendT ProcessOptimizer::~ProcessOptimizer() { + APP_LOGI("ProcessOptimizer destructed"); + DelayedSingleton::GetInstance()->LowMemoryAlert = nullptr; if (lmksClient_) { lmksClient_->ProcPurge(); }