Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15, 6.4.1
-
9331947a9 (dev), b3d017e89 (6.6)
Description
It is possible to get a function called on an object after it is deleted. This occurs when the function was connected to a signal using the .connect function. Then the signal will continue to call the function after the function's object is deleted. The function is still around, but references to the object it was on are invalidated (usually making it worthless). Since this is more analogous to a slot on a QObject than a JS function on a JS object, it should probably disconnect and clean up the function as well when the object is destroyed.
This does not occur when the Connections element is used inside the dynamic object, only when a .connect is used to connect to a QML-defined slot on the dynamic object
Attachments
Issue Links
- relates to
-
QTBUG-118166 Allow specifying a receiver/context object as an argument to connect()
-
- Closed
-
-
QTBUG-117866 Accessing destroyed value in a method connected to a Signal results in a crash.
-
- Closed
-