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

QThreadPool: QRunnable not always auto-deleted when using releaseThread()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.1
    • 4.7.0
    • Core: Threads
    • None
    • Ubuntu 10.10
        but memory leak issue was observed on windows as well
    • 891b60bbc84ddde077072df3426539c716d47459 (qt/qtbase/dev) 5a4b275a201bfc653a99e8b6ab546573553b79ad (qt/qtbase/5.15)

    Description

      found this when tracing a huge memory leak in my application (in which I pass smart pointers to QtConcurrent::run).
      related to usage of: "releaseThread();

      {wait for mutex}

      ; reserveThread();" in my threads

      attached testcase triggers the issue

      (also: attached testcase hangs about every 10 times I run it)

      issue disappears when removing the releaseThread() and reserveThread() calls

      Attachments

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

        Activity

          People

            rok.mandeljc Rok Mandeljc
            stefaan Stefaan
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change