diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index adde541504..ac262de8aa 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -185,6 +185,7 @@ void Agent::run() { loop.exec(); QString scriptContents(reply->readAll()); + delete reply; qDebug() << "Downloaded script:" << scriptContents; diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 3da06a9c0e..a094432af2 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1736,6 +1736,9 @@ bool DomainServer::handleHTTPSRequest(HTTPSConnection* connection, const QUrl &u connection->respond(HTTPConnection::StatusCode302, QByteArray(), HTTPConnection::DefaultContentType, cookieHeaders); + delete tokenReply; + delete profileReply; + // we've redirected the user back to our homepage return true; diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c2ce4c9077..fa9a492467 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4008,7 +4008,7 @@ void Application::parseVersionXml() { QString latestVersion; QUrl downloadUrl; QString releaseNotes("Unavailable"); - QObject* sender = QObject::sender(); + QObject* sender = qobject_cast(QObject::sender()); QXmlStreamReader xml(qobject_cast(sender)); diff --git a/interface/src/ui/ScriptEditorWidget.cpp b/interface/src/ui/ScriptEditorWidget.cpp index f4a509baa6..660b9009b6 100644 --- a/interface/src/ui/ScriptEditorWidget.cpp +++ b/interface/src/ui/ScriptEditorWidget.cpp @@ -158,6 +158,8 @@ void ScriptEditorWidget::loadFile(const QString& scriptPath) { QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); loop.exec(); _scriptEditorWidgetUI->scriptEdit->setPlainText(reply->readAll()); + delete reply; + if (!saveAs()) { static_cast(this->parent()->parent()->parent())->terminateCurrentTab(); } diff --git a/interface/src/ui/SnapshotShareDialog.cpp b/interface/src/ui/SnapshotShareDialog.cpp index 046aa4d12c..47914e0a12 100644 --- a/interface/src/ui/SnapshotShareDialog.cpp +++ b/interface/src/ui/SnapshotShareDialog.cpp @@ -148,6 +148,7 @@ void SnapshotShareDialog::postRequestFinished() { QNetworkReply* requestReply = reinterpret_cast(sender()); QJsonDocument jsonResponse = QJsonDocument::fromJson(requestReply->readAll()); + requestReply->deleteLater(); const QJsonObject& responseObject = jsonResponse.object(); if (responseObject.contains("id")) { diff --git a/interface/src/ui/overlays/BillboardOverlay.cpp b/interface/src/ui/overlays/BillboardOverlay.cpp index bcb69bdce3..b34416f566 100644 --- a/interface/src/ui/overlays/BillboardOverlay.cpp +++ b/interface/src/ui/overlays/BillboardOverlay.cpp @@ -205,6 +205,7 @@ void BillboardOverlay::replyFinished() { QNetworkReply* reply = static_cast(sender()); _billboard = reply->readAll(); _isLoaded = true; + reply->deleteLater(); } bool BillboardOverlay::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, diff --git a/interface/src/ui/overlays/ImageOverlay.cpp b/interface/src/ui/overlays/ImageOverlay.cpp index d7a6889c05..1ecfc74e44 100644 --- a/interface/src/ui/overlays/ImageOverlay.cpp +++ b/interface/src/ui/overlays/ImageOverlay.cpp @@ -66,6 +66,7 @@ void ImageOverlay::replyFinished() { _textureImage.loadFromData(rawData); _renderImage = true; _isLoaded = true; + reply->deleteLater(); } void ImageOverlay::render(RenderArgs* args) { diff --git a/libraries/audio/src/Sound.cpp b/libraries/audio/src/Sound.cpp index 2608c333d6..54ff61d66a 100644 --- a/libraries/audio/src/Sound.cpp +++ b/libraries/audio/src/Sound.cpp @@ -80,6 +80,7 @@ void Sound::downloadFinished(QNetworkReply* reply) { } _isReady = true; + reply->deleteLater(); } void Sound::downSample(const QByteArray& rawAudioByteArray) { diff --git a/libraries/entities-renderer/src/EntityTreeRenderer.cpp b/libraries/entities-renderer/src/EntityTreeRenderer.cpp index 4f0f1c80a8..47e9237ddc 100644 --- a/libraries/entities-renderer/src/EntityTreeRenderer.cpp +++ b/libraries/entities-renderer/src/EntityTreeRenderer.cpp @@ -145,6 +145,7 @@ QString EntityTreeRenderer::loadScriptContents(const QString& scriptMaybeURLorTe } else { qDebug() << "ERROR Loading file:" << url.toString(); } + delete reply; } } diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 126ef27414..e4f31e666e 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -240,6 +240,7 @@ void DomainHandler::settingsRequestFinished() { requestDomainSettings(); } } + settingsReply->deleteLater(); } void DomainHandler::parseDTLSRequirementPacket(const QByteArray& dtlsRequirementPacket) { diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index fc9cdc5430..c1cdcb594a 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -194,6 +194,8 @@ void ScriptEngine::handleScriptDownload() { qDebug() << "ERROR Loading file:" << reply->url().toString(); emit errorLoadingScript(_fileNameString); } + + reply->deleteLater(); } void ScriptEngine::init() { @@ -604,6 +606,7 @@ void ScriptEngine::include(const QString& includeFile) { QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); loop.exec(); includeContents = reply->readAll(); + reply->deleteLater(); } else { #ifdef _WIN32 QString fileName = url.toString(); diff --git a/libraries/script-engine/src/XMLHttpRequestClass.cpp b/libraries/script-engine/src/XMLHttpRequestClass.cpp index dec20dface..a756b3fe8f 100644 --- a/libraries/script-engine/src/XMLHttpRequestClass.cpp +++ b/libraries/script-engine/src/XMLHttpRequestClass.cpp @@ -332,7 +332,7 @@ void XMLHttpRequestClass::abortRequest() { if (_reply) { disconnectFromReply(_reply); _reply->abort(); - delete _reply; + _reply->deleteLater(); _reply = NULL; }