QNetworkReply deleteLater before finished



  • Hi All,

    I know that i should use deleteLater(), but can I use it before finished? For example:
    @
    void do_request()
    {
    QNetworkRequest request;
    request.setUrl(QUrl(ntf_url.c_str()));

    QNetworkReply *reply = nam->get(request);
    if (reply)
    {
        reply->deleteLater();
    }
    

    }
    @



  • Hi,
    deleteLater will make sure the object is removed when it's event list is empty. Can't you connect the finished signal to the deleteLater slot??


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.