disconnect happens automatically?
Unsolved
General and Desktop
-
I have an object that needs to send signals to the GUI, so I connect it to a slot.
However later I delete that object.
I noticed I can always say when I'm done with the object:disconnect(myObject);
However does this also happen automatically when its deallocator is called?
-
@Publicnamer
Yep :)In general you don't need to worry about explicitly calling
disconnect()
. -
Properly explained in the documentation to QObject::disconnect(): 'A signal-slot connection is removed when either of the objects involved are destroyed.'