Skip to content

[SYCL] Second approach to piDeviceRelease resource leak fix. #2671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cperkinsintel
Copy link
Contributor

piDeviceRelease resource leak fix - second attempt. There is a circular dependency between the device_impl and the platform_impl, each holding a shared pointer to the other, which prevents their destruction. In this second approach, I've replaced the vector of shared pointers in the platform_impl with a vector of weak_ptr. It seems to work well. The destructors are getting called, and piDeviceRetain/Release calls are balanced.
Original draft is here: #2668

Signed-off-by: Chris Perkins [email protected]

…ar dependency between the device_impl and the platform_impl, each holding a shared pointer to the other, which prevents their destruction. In this second approach, I've replaced the vector of shared pointers in the platform_impl with a vector of weak_ptr. It seems to work well. The destructors are getting called, and piDeviceRetain/Release calls are balanced.

Signed-off-by: Chris Perkins <[email protected]>
@s-kanaev
Copy link
Contributor

/summary:run

@romanovvlad romanovvlad merged commit 255f304 into intel:sycl Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants