mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:24:47 +02:00
Merge pull request #7414 from zzmp/fix/leaking-reply
Delete used QNetworkReply
This commit is contained in:
commit
afa6e6e30a
2 changed files with 2 additions and 0 deletions
|
@ -271,6 +271,7 @@ QNetworkReply* OBJReader::request(QUrl& url, bool isTest) {
|
||||||
QNetworkRequest netRequest(url);
|
QNetworkRequest netRequest(url);
|
||||||
QNetworkReply* netReply = isTest ? networkAccessManager.head(netRequest) : networkAccessManager.get(netRequest);
|
QNetworkReply* netReply = isTest ? networkAccessManager.head(netRequest) : networkAccessManager.get(netRequest);
|
||||||
if (!qApp || aboutToQuit) {
|
if (!qApp || aboutToQuit) {
|
||||||
|
netReply->deleteLater();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
QEventLoop loop; // Create an event loop that will quit when we get the finished signal
|
QEventLoop loop; // Create an event loop that will quit when we get the finished signal
|
||||||
|
|
|
@ -1700,6 +1700,7 @@ bool Octree::readFromURL(const QString& urlString) {
|
||||||
QDataStream inputStream(reply);
|
QDataStream inputStream(reply);
|
||||||
readOk = readFromStream(resourceSize, inputStream);
|
readOk = readFromStream(resourceSize, inputStream);
|
||||||
}
|
}
|
||||||
|
delete reply;
|
||||||
}
|
}
|
||||||
return readOk;
|
return readOk;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue