From 07fa35730d660c6aa511ea15162a6cd02b6a85ba Mon Sep 17 00:00:00 2001 From: LTLA Date: Sun, 12 May 2024 23:21:29 -0700 Subject: [PATCH] Virtualized the destructors for the Extractor base classes. I'm not sure this is really necessary as we're not calling the destructors through the base pointers, but better safe than sorry to avoid memory leaks. --- include/tatami_chunked/CustomDenseChunkedMatrix.hpp | 6 +++--- include/tatami_chunked/CustomSparseChunkedMatrix.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/tatami_chunked/CustomDenseChunkedMatrix.hpp b/include/tatami_chunked/CustomDenseChunkedMatrix.hpp index 5e6b1dc..4ce8543 100644 --- a/include/tatami_chunked/CustomDenseChunkedMatrix.hpp +++ b/include/tatami_chunked/CustomDenseChunkedMatrix.hpp @@ -78,7 +78,7 @@ struct DenseBaseSolo { final_solo(factory.create()) {} - ~DenseBaseSolo() = default; + virtual ~DenseBaseSolo() = default; protected: template @@ -112,7 +112,7 @@ struct DenseBaseMyopic { cache(max_slabs_in_cache) {} - ~DenseBaseMyopic() = default; + virtual ~DenseBaseMyopic() = default; protected: template @@ -143,7 +143,7 @@ struct DenseBaseOracular { cache(std::move(ora), max_slabs_in_cache) {} - ~DenseBaseOracular() = default; + virtual ~DenseBaseOracular() = default; protected: template diff --git a/include/tatami_chunked/CustomSparseChunkedMatrix.hpp b/include/tatami_chunked/CustomSparseChunkedMatrix.hpp index 21223af..66074ab 100644 --- a/include/tatami_chunked/CustomSparseChunkedMatrix.hpp +++ b/include/tatami_chunked/CustomSparseChunkedMatrix.hpp @@ -84,7 +84,7 @@ struct SparseBaseSolo { final_solo(factory.create()) {} - ~SparseBaseSolo() = default; + virtual ~SparseBaseSolo() = default; protected: template @@ -120,7 +120,7 @@ struct SparseBaseMyopic { cache(max_slabs_in_cache) {} - ~SparseBaseMyopic() = default; + virtual ~SparseBaseMyopic() = default; protected: template @@ -153,7 +153,7 @@ struct SparseBaseOracular { cache(std::move(ora), max_slabs_in_cache) {} - ~SparseBaseOracular() = default; + virtual ~SparseBaseOracular() = default; protected: template