3

I have a Qt application (Qt 5.5) that is launching from a usb drive on windows. In main I am using QProcess::start (NOT QProcess::startDetached) to start a new process. When killing the parent the child lives on and is functioning normally. The parent process is no longer listed in my taskManager, so it seems to be truly dead. Does anyone know why this might happen?

  • 1
    Are you creating the `QProcess` on the heap? If so, make sure you're deleting it when the parent process exits. It sounds like the `QProcess` destructor is never called in this case. – bnaecker Mar 23 '16 at 01:50
  • @bnaecker Thanks a lot for the reply. I believe you are right. I am creating the QProcess on the heap (QProcess * myProcess = new QProcess();) and I guess when the parent dies it never calls the destructor. Specifically deleting the QProcess definitely deletes it. – Von Botteicher Mar 23 '16 at 21:33

0 Answers0