From: David Wells Date: Wed, 2 Sep 2020 17:16:29 +0000 (-0400) Subject: Use a virtual destructor with virtual methods. X-Git-Tag: v9.3.0-rc1~1143^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10879%2Fhead;p=dealii.git Use a virtual destructor with virtual methods. --- diff --git a/include/deal.II/base/memory_space.h b/include/deal.II/base/memory_space.h index 8a475d320c..56c6084498 100644 --- a/include/deal.II/base/memory_space.h +++ b/include/deal.II/base/memory_space.h @@ -117,6 +117,13 @@ namespace MemorySpace : values(nullptr, &std::free) {} + virtual ~MemorySpaceData() = default; + + MemorySpaceData(MemorySpaceData &&) noexcept = default; + + MemorySpaceData & + operator=(MemorySpaceData &&) noexcept = default; + virtual void copy_to(Number *begin, std::size_t n_elements) { @@ -157,6 +164,13 @@ namespace MemorySpace , values_dev(nullptr, Utilities::CUDA::delete_device_data) {} + virtual ~MemorySpaceData() = default; + + MemorySpaceData(MemorySpaceData &&) noexcept = default; + + MemorySpaceData & + operator=(MemorySpaceData &&) noexcept = default; + virtual void copy_to(Number *begin, std::size_t n_elements) {