diff --git a/include/CL/sycl/accessor/detail/accessor_base.hpp b/include/CL/sycl/accessor/detail/accessor_base.hpp index 2548b731d..82c3f7c3c 100644 --- a/include/CL/sycl/accessor/detail/accessor_base.hpp +++ b/include/CL/sycl/accessor/detail/accessor_base.hpp @@ -63,6 +63,9 @@ class accessor_base { #ifdef TRISYCL_OPENCL /// Get the boost::compute::buffer or throw if unset virtual boost::compute::buffer get_cl_buffer() const = 0; + + // Virtual to call the real destructor + virtual ~accessor_base() {} #endif }; diff --git a/include/CL/sycl/error_handler.hpp b/include/CL/sycl/error_handler.hpp index 20d9d9b19..69a908d12 100644 --- a/include/CL/sycl/error_handler.hpp +++ b/include/CL/sycl/error_handler.hpp @@ -42,7 +42,7 @@ struct error_handler { */ static trisycl::default_error_handler default_handler; - + // Virtual to call the real destructor virtual ~error_handler() = 0; };