PDA

View Full Version : C++/Qt5 - Signals with no receiver, what happens?



jimbo
12th October 2016, 16:56
Hello,

Suppose I have a mainwindow emitting signals to a dialog.
What happens if there is no dialog active at the time the sinals are sent?
Do the signals just vanish or is memory used and left floating (leak).
This has not happend, its just a question.

Regards

Lesiok
12th October 2016, 17:05
Signals are supplied to connected recivers. When receiver is deleted all signals connected to them are auto disconnected. So when You send a signal without receivers nothing happens.

jimbo
12th October 2016, 17:14
Hello Lesiok,

Thanks for your response.
So not a problem, if it happens.

Regards