From ec0f06be05585189f5eb482e66771d8004d70a5e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 1 Dec 2023 22:53:17 -0400 Subject: [PATCH] make sure the leak checker works --- CMakeLists.txt | 2 ++ src/geoarrow_geos/geoarrow_geos_test.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6425fa2..0e8179d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,8 @@ install( PATTERN "*.h") if(GEOARROW_GEOS_BUILD_TESTS) + set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --error-exitcode=1") + include(CTest) if(NOT DEFINED CMAKE_CXX_STANDARD) diff --git a/src/geoarrow_geos/geoarrow_geos_test.cc b/src/geoarrow_geos/geoarrow_geos_test.cc index 6f9fa1c..e1481cf 100644 --- a/src/geoarrow_geos/geoarrow_geos_test.cc +++ b/src/geoarrow_geos/geoarrow_geos_test.cc @@ -23,7 +23,7 @@ class GEOSCppGeometry { ~GEOSCppGeometry() { if (ptr != nullptr) { - GEOSGeom_destroy_r(handle, ptr); + // GEOSGeom_destroy_r(handle, ptr); } } };