Skip to content

Commit

Permalink
Virtualized the destructors for the Extractor base classes.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LTLA committed May 13, 2024
1 parent 6551664 commit 07fa357
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/tatami_chunked/CustomDenseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct DenseBaseSolo {
final_solo(factory.create())
{}

~DenseBaseSolo() = default;
virtual ~DenseBaseSolo() = default;

protected:
template<typename ... Args_>
Expand Down Expand Up @@ -112,7 +112,7 @@ struct DenseBaseMyopic {
cache(max_slabs_in_cache)
{}

~DenseBaseMyopic() = default;
virtual ~DenseBaseMyopic() = default;

protected:
template<typename ... Args_>
Expand Down Expand Up @@ -143,7 +143,7 @@ struct DenseBaseOracular {
cache(std::move(ora), max_slabs_in_cache)
{}

~DenseBaseOracular() = default;
virtual ~DenseBaseOracular() = default;

protected:
template<typename ... Args_>
Expand Down
6 changes: 3 additions & 3 deletions include/tatami_chunked/CustomSparseChunkedMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct SparseBaseSolo {
final_solo(factory.create())
{}

~SparseBaseSolo() = default;
virtual ~SparseBaseSolo() = default;

protected:
template<typename ... Args_>
Expand Down Expand Up @@ -120,7 +120,7 @@ struct SparseBaseMyopic {
cache(max_slabs_in_cache)
{}

~SparseBaseMyopic() = default;
virtual ~SparseBaseMyopic() = default;

protected:
template<typename ... Args_>
Expand Down Expand Up @@ -153,7 +153,7 @@ struct SparseBaseOracular {
cache(std::move(ora), max_slabs_in_cache)
{}

~SparseBaseOracular() = default;
virtual ~SparseBaseOracular() = default;

protected:
template<typename ... Args_>
Expand Down

0 comments on commit 07fa357

Please sign in to comment.