The magic comes from the fact, that a signal has weak reference semantics, which means if you drop all references to the target object, it won't be kept in memory because of the connected signal, instead the slot gets de-registered automatically.
Surprisingly a lot of people seem to be unaware of this very useful and important characteristic of signals. Probably because of coming from a C#/Java background instead of a C++ (boost, gtk, QT) background, whose signals implementations are all weak ref based. Best regards, Robert
