if (_reply != NULL) {
// disconnect so that we do not get useless signals
// and remove the reply disconnectFromReplySignals(); _reply->abort(); _reply->deleteLater();
_reply = NULL;
}
// remove current data and metadata cleanUpCurrentData();
emit q->canceled(true);
As soon as the cancel is called if the reply is not null we will call deleteLater, the only diff between a delete and a deleteLater is that deleteLater will delete the object once all the signals of the reply object have been processed.. I could try and use a delete and ignore those signals since we have aborted the request to see if that speeds up the process.
Looking at the cancelation code of the singled download object (since a group download is a simple collection of those) we have the following:
qDebug() << __PRETTY_FUNCTION__ << _url;
if (_reply != NULL) {
disconnect FromReplySignal s();
_reply- >abort( );
_reply- >deleteLater( );
// disconnect so that we do not get useless signals
// and remove the reply
_reply = NULL;
}
// remove current data and metadata
cleanUpCurrent Data();
emit q->canceled(true);
As soon as the cancel is called if the reply is not null we will call deleteLater, the only diff between a delete and a deleteLater is that deleteLater will delete the object once all the signals of the reply object have been processed.. I could try and use a delete and ignore those signals since we have aborted the request to see if that speeds up the process.