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

create QQmlEngine in other threads

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.10, 5.12.0
    • Quick: Other
    • None
    • Windows

    Description

      //code

      while(true){

      QQmlEngine* engine=new QQmlEngine

      { QQmlComponent com(engine) com.load("D:/1.qml") QObject *ob=com.createOb(); delete ob; }

      delete engine;

      }

      //comment

      when  execute code in 5 threads ,it will crash,can QQmlEngine  be used in other thread???

       

      //code

      class MyThread:public QThread{

       void run(){

        if(!engine)

       engine=new QQmlEngine

       

      if(!d_ob)

      {  QQmlComponent com(engine)  com.load("D:/1.qml") d_ob=com.createOb(); }

      return QThread::run();

      }

       

      private:

      QQmlEngine* engine=null

      QObject*d_ob=null

      }

      //comment

      while 1.qml has Timer (QtQml 2.2) Component,when start and end thread and start thread,

      it will crash,

      when start thread  and end thread ,start thread  and end thread ,start thread  and end thread ,start thread  and end thread .....,it will lead to memery leak

       

       

      //code

      import QtQuick.Controls 1.4

      BusyIndicator

      {   }

      //comment

      when BusyIndicator in  QtQuick.Controls 1.4  create and destroyed,it will lead to momery leak

      when .js file is not ( .pragma lib), create and destroyed,it will lead to memery leak

       

       

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            leig 1 1
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes