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

Promise might leak memory

XMLWordPrintable

    • Linux/X11

      When the callback object from a Promise object is kept in C++ side like the slot for timeout in the example, and the callback object is invoked using QJSValue::call, the arguments might stay in memory and cause a memory leak.

      STR:

      1. Run the example and click the window area. See if any "destroyed" shows up in the console.
      2. Without setting Qt::SingleShotConnection in the connection, the MemoryEater object passed to the callback object is not GC'd.

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

            diseraluca Luca Di Sera
            fusionfuture Yuanzheng Wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes