I\'m looking for a solution to schedule the deletion of an object across threads. The docs about how deleteLater
behave are not entirely clear. Can I call this
deleteLater()
only means that the object will be deleted after all signal/slots int the current event loop (i.e. ThreadB) have been treated.
So, if no other slots need ObjectX in ThreadB, it is equivalent to a plain delete
.
Whether you can delete the object or not and how it will be handled in ThreadA is up to your app logic.
If ObjectX is the main object of the thread, sending the quit()
signal to ThreadA is the way to go.