Removing QObject during signal / slot processing

I know that removing a QObject from the processing of the slot may cause the application to crash, because it may have other events in the queue. So instead of using "delete obj" I will use obj-> deleteLater (). As far as I know, obj waits for all events in the queue to be processed, and then "delete obj".

QObject :: ~ QObject () All signals from and from the object are automatically disconnected, and any pending events for the object are removed from the event queue. However, it is often safer to use deleteLater () instead of directly deleting a subclass of QObject.

But what about other processes with a signal / slot? I mean, if you connected signals / slot from objects that live in different streams, like Qt :: QueuedConnection or Qt :: BlockingQueuedConnection. Are they disabled for processing?

Thanks in advance.

+1
source share
1 answer

deleteLater , . Qt::QueuedConnection Qt::BlockingQueuedConnection ( Qt::AutoConnection) , , .
, , , Qt::*QueuedConnection , . , deleteLater. , Qt::DirectConnection (delete pointer;) .

+1

All Articles