Deletion of qt network reply objects.

Former-commit-id: 258badb680014a187d76d9183080ea3de6895692
This commit is contained in:
ntim 2016-03-20 13:33:41 +01:00
parent 926f47fc1a
commit e0c3ece80d

View File

@ -225,6 +225,8 @@ void LedDevicePhilipsHue::put(QString route, QString content) {
loop.connect(reply, SIGNAL(finished()), SLOT(quit()));
// Go into the loop until the request is finished.
loop.exec();
// Free space.
reply->deleteLater();
}
QByteArray LedDevicePhilipsHue::get(QString route) {
@ -238,7 +240,11 @@ QByteArray LedDevicePhilipsHue::get(QString route) {
// Go into the loop until the request is finished.
loop.exec();
// Read all data of the response.
return reply->readAll();
QByteArray response = reply->readAll();
// Free space.
reply->deleteLater();
// Return response
return response;
}
QString LedDevicePhilipsHue::getStateRoute(unsigned int lightId) {