Reputation: 9595
QNetworkAccessManager::post function returns network reply object, is caller required to delete this or network access manager will take care of deleting it.?
Upvotes: 2
Views: 2444
Reputation: 409
you can do it in slot if readyRead
reply->abort();
reply->deleteLater();
reply->manager()->deleteLater();
Upvotes: 1
Reputation: 41306
From the documentation:
Note: After the request has finished, it is the responsibility of the user to delete the QNetworkReply object at an appropriate time. Do not directly delete it inside the slot connected to finished(). You can use the deleteLater() function.
Upvotes: 4