[Qt-interest] QNetwork handling errors and memory

Richard Baron Penman richardbp+qt at gmail.com
Mon Feb 9 02:21:44 CET 2009


hello,

I have the following code to make a GET request and trigger a slot when
finished:
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)), this,
SLOT(requestFinished(QNetworkReply *)));
manager->get(QNetworkRequest(url));

Do I need to release the manager memory in the slot or is this handled
automatically? Or is there a better way to manage the memory?
Also will the slot be called in all cases, including errors and timeouts?

thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090209/fc0045ac/attachment.html 


More information about the Qt-interest-old mailing list