modify View::~View

This commit is contained in:
侯歌 2024-06-18 20:42:11 +08:00
parent 7a3d7d3f41
commit 3d977de29b
2 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules(PC_CAIRO QUIET cairo) pkg_check_modules(PC_CAIRO cairo)
if(CMAKE_HOST_WIN32) if(CMAKE_HOST_WIN32)
find_path(CAIRO_INCLUDE_DIRS 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} ")") message(FATAL_ERROR "Required version (" ${Cairo_FIND_VERSION} ") is higher than found version (" ${CAIRO_VERSION} ")")
endif () endif ()
if ( CAIRO_INCLUDE_DIRS AND CAIRO_LIBRARIES)
set(CAIRO_LIBRARY ${CAIRO_LIBRARIES})
set(CAIRO_INCLUDE_DIR ${CAIRO_INCLUDE_DIRS})
endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo REQUIRED_VARS CAIRO_INCLUDE_DIRS CAIRO_INCLUDE_DIR CAIRO_LIBRARIES CAIRO_LIBRARY VERSION_VAR CAIRO_VERSION)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo
REQUIRED_VARS CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES
VERSION_VAR CAIRO_VERSION)
mark_as_advanced(CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES CAIRO_VERSION) mark_as_advanced(CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES CAIRO_VERSION)

View File

@ -406,7 +406,6 @@ View::~View(){
mViewCount --; mViewCount --;
LOGD_IF(View::VIEW_DEBUG||(mViewCount>1000),"%p:%d mViewCount=%d",this,mID,mViewCount); LOGD_IF(View::VIEW_DEBUG||(mViewCount>1000),"%p:%d mViewCount=%d",this,mID,mViewCount);
delete mRunQueue;
delete mScrollCache; delete mScrollCache;
mScrollCache = nullptr; mScrollCache = nullptr;
mMeasureCache.clear(); mMeasureCache.clear();
@ -435,6 +434,7 @@ View::~View(){
delete mOverlay; delete mOverlay;
delete mAnimator; delete mAnimator;
delete mFloatingTreeObserver; delete mFloatingTreeObserver;
delete mRunQueue;
} }
bool View::isShowingLayoutBounds()const{ bool View::isShowingLayoutBounds()const{