From 3d977de29b4a0dd0d5d6616bf3b7493ce6a0bf58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E6=AD=8C?= Date: Tue, 18 Jun 2024 20:42:11 +0800 Subject: [PATCH] modify View::~View --- cmake/modules/FindCairo.cmake | 12 ++++++------ src/gui/view/view.cc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmake/modules/FindCairo.cmake b/cmake/modules/FindCairo.cmake index ee974162..fc9cb452 100755 --- a/cmake/modules/FindCairo.cmake +++ b/cmake/modules/FindCairo.cmake @@ -29,7 +29,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. find_package(PkgConfig) -pkg_check_modules(PC_CAIRO QUIET cairo) +pkg_check_modules(PC_CAIRO cairo) if(CMAKE_HOST_WIN32) find_path(CAIRO_INCLUDE_DIRS @@ -74,10 +74,10 @@ if ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}") message(FATAL_ERROR "Required version (" ${Cairo_FIND_VERSION} ") is higher than found version (" ${CAIRO_VERSION} ")") endif () +if ( CAIRO_INCLUDE_DIRS AND CAIRO_LIBRARIES) + set(CAIRO_LIBRARY ${CAIRO_LIBRARIES}) + set(CAIRO_INCLUDE_DIR ${CAIRO_INCLUDE_DIRS}) +endif() include(FindPackageHandleStandardArgs) - -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo - REQUIRED_VARS CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES - VERSION_VAR CAIRO_VERSION) - +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo REQUIRED_VARS CAIRO_INCLUDE_DIRS CAIRO_INCLUDE_DIR CAIRO_LIBRARIES CAIRO_LIBRARY VERSION_VAR CAIRO_VERSION) mark_as_advanced(CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES CAIRO_VERSION) diff --git a/src/gui/view/view.cc b/src/gui/view/view.cc index 875bb31a..55dad9cf 100755 --- a/src/gui/view/view.cc +++ b/src/gui/view/view.cc @@ -406,7 +406,6 @@ View::~View(){ mViewCount --; LOGD_IF(View::VIEW_DEBUG||(mViewCount>1000),"%p:%d mViewCount=%d",this,mID,mViewCount); - delete mRunQueue; delete mScrollCache; mScrollCache = nullptr; mMeasureCache.clear(); @@ -435,6 +434,7 @@ View::~View(){ delete mOverlay; delete mAnimator; delete mFloatingTreeObserver; + delete mRunQueue; } bool View::isShowingLayoutBounds()const{