PDA

View Full Version : Question about QNetworkReply from QNetworkAccessManager



AcerExtensa
18th June 2010, 10:09
Hi peoples!
I'm use QNetworkAccessManager to communicate with servers in net using get and post functions/methods of this class...
Docu says what get and post functions
returns a new QNetworkReply object ...
Do I need to delete this QNetworkReply objects after the job is done, or the QNetworkAccesManager handle this?

Should I
delete reply; //reply is pointer on QNetworkReply object, obtained from QNetworkAccessManager->get() function
or not?

Thanks in advance!

tbscope
18th June 2010, 10:42
It's all in 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.

AcerExtensa
18th June 2010, 11:04
Thank you!
Read Detailed Description and not only function description is a good idea :D