Skip to content

Commit 7db0650

Browse files
Can't use unique_ptr because of deleter.
1 parent 18db4f0 commit 7db0650

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3423,7 +3423,7 @@ class __SYCL_EXPORT handler {
34233423
uint64_t SignalValue);
34243424

34253425
private:
3426-
std::unique_ptr<detail::handler_impl> MImplOwner;
3426+
std::shared_ptr<detail::handler_impl> MImplOwner;
34273427
detail::handler_impl *impl;
34283428
std::shared_ptr<detail::queue_impl> &MQueue;
34293429
std::vector<detail::LocalAccessorImplPtr> MLocalAccStorage;

sycl/source/handler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fill_copy_args(detail::handler_impl *impl,
304304

305305
handler::handler(std::shared_ptr<detail::queue_impl> &Queue,
306306
bool CallerNeedsEvent)
307-
: MImplOwner(std::make_unique<detail::handler_impl>(Queue.get(), nullptr,
307+
: MImplOwner(std::make_shared<detail::handler_impl>(Queue.get(), nullptr,
308308
CallerNeedsEvent)),
309309
impl(MImplOwner.get()), MQueue(Queue) {}
310310

0 commit comments

Comments
 (0)