When qnetworkreply is delete after request from QNetworkAccessManager::get(QNetworkRequest request (url))?
-
I am accessing the network using
QNetworkRequest,QNetworkAccessManager, andQNetworkReply.At which place
m_replydelete? it will delete whenmanagerdelete or it will delete at any other place?QNetworkAccessManager* manager = new QNetworkAccessManager(); auto m_reply = manager ->get(QNetworkRequest request (https://www.google.com)); // Here read all the data from m_reply and call m_reply->close(); // again use same manage for request data m_reply = manager ->get(QNetworkRequest request (https://www.facebook.com));Can I use
m_replyvariable in this way? -
Hi,
Usually you don't store the reply but rather connect its signals to lambdas, do the processing there and then call deleteLater on it once you are done.