Removing "QNetworkReply *" returned by QNetworkAccessManager :: post

The QNetworkAccessManager :: post function returns a network response object, the caller needed to remove it or the network access manager will take care of the removal.

+2


source to share


2 answers


From the documentation :



Note. Upon completion of the request, it is the user's responsibility to remove the QNetworkReply object at an appropriate time. Do not directly remove it to the slot connected to the finished (). You can use the deleteLater () Function.

+4


source


you can do it in slot if readyRead



   reply->abort();
    reply->deleteLater();
    reply->manager()->deleteLater();

      

+1


source







All Articles