From 448b4a5da1b47bf3770d46795ed3b0b2d6a971d0 Mon Sep 17 00:00:00 2001 From: youbing54 Date: Fri, 6 Sep 2024 16:14:17 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:=20https://gitee.com/openharmony/arkui?= =?UTF-8?q?=5Face=5Fengine=5Flite/issues/IAPFUR=20describe:=20LazyLoadMana?= =?UTF-8?q?ger=E6=B2=A1=E6=9C=89=E8=A2=AB=E9=87=8A=E6=94=BE=20Feature=20or?= =?UTF-8?q?=20Bugfix:=20Bugfix=20Binary=20Source:Yes=20Signed-off-by:=20yo?= =?UTF-8?q?ubing54?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frameworks/src/core/router/js_page_state_machine.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frameworks/src/core/router/js_page_state_machine.cpp b/frameworks/src/core/router/js_page_state_machine.cpp index 9e3e2c2f..3b42b5bf 100644 --- a/frameworks/src/core/router/js_page_state_machine.cpp +++ b/frameworks/src/core/router/js_page_state_machine.cpp @@ -442,11 +442,6 @@ void StateMachine::ReleaseRootObject() const void StateMachine::ReleaseHistoryPageResource() { - // remove all native views and release components styles. - if (appContext_ != nullptr) { - appContext_->ReleaseStyles(); - appContext_->ReleaseLazyLoadManager(); - } // release scroll layer object. if (scrollLayer_ != nullptr) { if (!isEntireHidden_) { @@ -479,6 +474,12 @@ void StateMachine::ReleaseHistoryPageResource() if (remainComponentCount != 0) { HILOG_ERROR(HILOG_MODULE_ACE, "[%{public}d] components leaked!", remainComponentCount); } + + // remove all native views and release components styles. + if (appContext_ != nullptr) { + appContext_->ReleaseStyles(); + appContext_->ReleaseLazyLoadManager(); + } } void StateMachine::DeleteViewModelProperties() const -- Gitee