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

[QtQuick] Memory leak in QQuickWindowPrivate::deliverTouchAsMouse()

XMLWordPrintable

    • 814d15c5255cf4a46419c21d5f193bb1a499f9f4

      In function: QQuickWindowPrivate::deliverTouchAsMouse QTouchEvent is created to heap:

      qquickwindow.cpp
      QTouchEvent *event = pointerEvent->asPointerTouchEvent()->touchEventForItem(item);
      

      By function

      qquickevents.cpp
      QTouchEvent *QQuickPointerTouchEvent::touchEventForItem(QQuickItem
      *item, bool isFiltering) const
      {
      ...
      QTouchEvent *touchEvent = new QTouchEvent(eventType);
      ...
      }
      

      QScopedPointer should be used instead of QTouchEvent *event to make sure Qt will delete the QTouchEvent created in heap.

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

            tuomas.vaarala Tuomas Vaarala
            tuomas.vaarala Tuomas Vaarala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes