diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-06-20 16:19:24 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-06-22 14:32:01 +0200 |
commit | 73e1bc09e63394490d91a223b3479b46c1595d66 (patch) | |
tree | 0369aa685997f4027d45aa8d3b56a68ded868cdb /src/corelib/thread | |
parent | cf9cd8cc081397d08f48b6ae0d9380b11f4929dd (diff) |
Move QFutureInterfaceBase::cleanContinuation() to removed_api
This method isn't used anymore, but we can't remove it entirely for BC
reasons, because it was called from inline code.
Pick-to: 6.4
Change-Id: I9183c666c466030787ac7c2386706b50abf23eaa
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qfutureinterface.cpp | 12 | ||||
-rw-r--r-- | src/corelib/thread/qfutureinterface.h | 2 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/corelib/thread/qfutureinterface.cpp b/src/corelib/thread/qfutureinterface.cpp index 8cdc10a94b..a82b7af873 100644 --- a/src/corelib/thread/qfutureinterface.cpp +++ b/src/corelib/thread/qfutureinterface.cpp @@ -829,18 +829,6 @@ void QFutureInterfaceBase::setContinuation(std::function<void(const QFutureInter } } -void QFutureInterfaceBase::cleanContinuation() -{ - if (!d) - return; - - // This is called when the associated QPromise is being destroyed. - // Clear the continuation, to make sure it doesn't keep any ref-counted - // copies of this, so that the allocated memory can be freed. - QMutexLocker lock(&d->continuationMutex); - d->continuation = nullptr; -} - void QFutureInterfaceBase::runContinuation() const { QMutexLocker lock(&d->continuationMutex); diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index eb251c7d14..820faa9ec2 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -183,7 +183,9 @@ protected: void setContinuation(std::function<void(const QFutureInterfaceBase &)> func); void setContinuation(std::function<void(const QFutureInterfaceBase &)> func, QFutureInterfaceBasePrivate *continuationFutureData); +#if QT_CORE_REMOVED_SINCE(6, 4) void cleanContinuation(); +#endif void runContinuation() const; void setLaunchAsync(bool value); |