qt5base-lts/tests/benchmarks/corelib/thread
Sona Kurazyan 614847eae9 Use QPromise when creating continuations to avoid memory leaks
Continuations were using QFutureInterface to create and return the
associated future to the user. Attaching a continuation to the returned
future could cause memory leaks (described in an earlier commit). Use a
QPromise when saving the continuation, to make sure that the attached
continuation is cleaned in the destructor of the associated QPromise, so
that it doesn't keep any ref-counted copies to the shared data, thus
preventing it from being deleted.

Task-number: QTBUG-99534
Pick-to: 6.3 6.2
Change-Id: I52d5501292095d41d1e060b7dd140c8e5d01335c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-21 01:51:20 +01:00
..
qfuture Use QPromise when creating continuations to avoid memory leaks 2022-01-21 01:51:20 +01:00
qmutex QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
qreadwritelock QReadWriteLocker: also benchmark recursive mode 2021-11-15 15:17:26 +01:00
qthreadpool Standardise layout and naming in corelib benchmarks 2021-08-30 19:21:08 +02:00
qthreadstorage Standardise layout and naming in corelib benchmarks 2021-08-30 19:21:08 +02:00
qwaitcondition QWaitCondition: also benchmark std::condition_variable{,_any} 2021-11-26 18:28:50 +01:00
CMakeLists.txt Add basic benchmarks for QFuture 2021-06-19 08:48:14 +02:00