-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Define ownership of QSharedMemory* pointer #184
Comments
We are aware of multiple issues with Qt's latest implementation of QSharedMemory and QSystemSemaphore and even the latter is not truly thread safe. Honestly I don't thing than any more changes will yield more safety and it's rather pointless. When the new implementation based on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The QSharedMemory object is currently dynamically allocated using the
new
operatorand finally deleted in the
abortSafely()
function.I suggest to define an ownership for the pointer. Either by defining a
QObject
parent in the constructor or by using astd::uniqe_ptr
.This will increase the probability that the destructor of the
QSharedMemory
object is called for unintended program flows.The text was updated successfully, but these errors were encountered: