Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
5.14.2
-
None
-
Ubuntu 20.04 on x86_64 CPU
Description
Why this code, running repeatedly in a custom object moved to QThread instance, produces memory leak?
void QCustomHTTPManager::compare() { // custom code to create request and multiPart content QNetworkReply *reply = networkaccessmanager->post(request,&multiPart); connect(reply,&QNetworkReply::finished,eventloop,&QEventLoop::quit); eventloop->exec(); emit compared(); reply->deleteLater(); }
No leak when change to this:
void QCustomHTTPManager::compare() { // custom code to create request and multiPart content QTimer::singleShot(1,loop,&QEventLoop::quit); eventloop->exec(); emit compared(); }
Attachments
Issue Links
- duplicates
-
QTBUG-88560 Memory leak on QNetworkAccessManager post function
- Closed