Does closing a QProcess detach it from QSharedMemory it was attached to?
-
- I create a
QSharedMemoryinstance in the main application. - I then create and start a
QProcessand wait for it to finish (or time out) in the main application thread - The created process attaches to the
QSharedMemoryinstance and starts doing some computation
The process then updates the main application on its progress via
readyRead(). A progress dialog is being displayed to the user and if they press Cancel, then the process is closed usingsubProcess->close().My question is: Since the child process is killed, is it automatically detached from the
QSharedMemoryit attached to? Or since it did not detach properly (viaQSharedMemory's destructor for example) would there be a memory leak?Thanks.
- I create a
-
The documentation is imo very clear about this: http://doc.qt.io/qt-5/qsharedmemory.html#details