Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.16, 6.6.2
-
None
Description
The documentation says that the QApplication takes ownership of the recognizer when it is registered:
Qt::GestureType QGestureRecognizer::registerRecognizer(QGestureRecognizer *recognizer)
The application takes ownership of the recognizer and returns the gesture type ID associated with it.
The registered recognizers are all deleted as expected when the QGestureManager is destroyed.
However, unregistering a returned gesture type with void QGestureRecognizer::unregisterRecognizer(Qt::GestureType type) does not delete the unregistered recognizer, resulting in a memory leak.
As the recognizer is unregistered by ID and not a pointer, this is inconsistent with other Qt APIs.