Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123585

Memory Leak: QGestureRecognizer::unregisterRecognizer()

    XMLWordPrintable

Details

    • All

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            rthompson Richard Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes