Files should be closed automatically. Script objects will receive a finalization event. As far as I remember there is not direct hook to plug in your own exit handler.
In some cases I also have active QProcess object, and on exit KLayout prints
"Warning: QProcess: Destroyed while process is still running."
Do I have to perform any additional cleanup actions ?
that's right - killing a QProcess object while the process is stilling running maybe isn't a good idea. On the other hand, I have not experienced bad issues with such a situation myself.
Nevertheless, I agree that shutting down cleanly is a good idea. I did some experimenting, found a few options not working (see https://github.com/KLayout/klayout/issues/251), but there is a really good solution:
RBA::Application::instance.aboutToQuit do
RBA::MessageBox::info("It's Over!", "The main window was destroyed", RBA::MessageBox::Ok)
end
Comments
Hi Yaroslav,
Files should be closed automatically. Script objects will receive a finalization event. As far as I remember there is not direct hook to plug in your own exit handler.
Matthias
In some cases I also have active QProcess object, and on exit KLayout prints
"Warning: QProcess: Destroyed while process is still running."
Do I have to perform any additional cleanup actions ?
Hi Yaroslav,
that's right - killing a QProcess object while the process is stilling running maybe isn't a good idea. On the other hand, I have not experienced bad issues with such a situation myself.
Nevertheless, I agree that shutting down cleanly is a good idea. I did some experimenting, found a few options not working (see https://github.com/KLayout/klayout/issues/251), but there is a really good solution:
Regards,
Matthias