File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ event_impl::event_impl(const QueueImplPtr &Queue)
192192}
193193
194194void event_impl::setQueue (queue_impl &Queue) {
195- MQueue = Queue.shared_from_this ();
195+ MQueue = Queue.weak_from_this ();
196196 MIsProfilingEnabled = Queue.MIsProfilingEnabled ;
197197
198198 // TODO After setting the queue, the event is no longer default
@@ -202,9 +202,9 @@ void event_impl::setQueue(queue_impl &Queue) {
202202}
203203
204204void event_impl::setSubmittedQueue (std::weak_ptr<queue_impl> SubmittedQueue) {
205- MSubmittedQueue = SubmittedQueue;
205+ MSubmittedQueue = std::move ( SubmittedQueue) ;
206206 if (MHostProfilingInfo) {
207- if (auto QueuePtr = SubmittedQueue .lock ()) {
207+ if (auto QueuePtr = MSubmittedQueue .lock ()) {
208208 device_impl &Device = QueuePtr->getDeviceImpl ();
209209 MHostProfilingInfo->setDevice (&Device);
210210 }
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ class event_impl {
235235 // /
236236 // / @return
237237 void setWorkerQueue (std::weak_ptr<queue_impl> WorkerQueue) {
238- MWorkerQueue = WorkerQueue;
238+ MWorkerQueue = std::move ( WorkerQueue) ;
239239 };
240240
241241 // / Sets original queue used for submission.
You can’t perform that action at this time.
0 commit comments