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

memory leak caused by QAdoptedThread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 5.0.0
    • 5.0.0
    • Core: Threads
    • None
    • windows 7 x64
      vs2010 sp1

    Description

      In Qt5, QAdoptedThread object created in QThreadData::current() is never released, which will also cause its corresponding QThreadData object leaked.
      The following code can produce this issue:

      int main(int argc, char *argv[])
      {
          QThread *t = QThread::currentThread();
      
          // memory leak detection
          int tmp = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
          tmp |= _CRTDBG_LEAK_CHECK_DF;
          _CrtSetDbgFlag(tmp);
      
          return 0;
      }
      
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            jianliang79 liang jian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes