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

leak in new Qt 5.10 QMetaObject::invokeMethod + lambda

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10.1
    • 5.10.0
    • Core: Object Model
    • None
    •  57318ce8c2f2fbc8cbdf987fc7e2f661c9a2e688

    Description

      The new QMetaObject::invokeMethod with lambda support, leaks when using Qt::QueuedConnection.
      See attached test application.

      The leaks is happens in qtbase\src\corelib\kernel\qobjectdefs.h
      line 535

      new QtPrivate::QFunctorSlotObjectWithNoArgs<Func, decltype(function())>(function),

      Note: I originally found this leak when using QMetaObject::invokeMethod with Qt::BlockingQueuedConnection across threads. In that case, there is more than one leak.
      For the sake of simplicity, my demo app limits the case to single thread + Qt::QueuedConnection

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-65462
          # Subject Branch Project Status CR V

          Activity

            People

              thiago Thiago Macieira
              jirauser26727 user-04d21 (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes