From 40d74faa5ec54f1277b9de4d0f80c1d9ebc2cf55 Mon Sep 17 00:00:00 2001 From: LordGrey <48840279+Lord-Grey@users.noreply.github.com> Date: Fri, 29 Dec 2023 18:08:47 +0100 Subject: [PATCH] Clear list after applying qDeleteAll --- libsrc/boblightserver/BoblightServer.cpp | 1 + libsrc/commandline/Parser.cpp | 1 + libsrc/jsonserver/JsonServer.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/libsrc/boblightserver/BoblightServer.cpp b/libsrc/boblightserver/BoblightServer.cpp index a58257ba..f6acccf8 100644 --- a/libsrc/boblightserver/BoblightServer.cpp +++ b/libsrc/boblightserver/BoblightServer.cpp @@ -63,6 +63,7 @@ void BoblightServer::stop() return; qDeleteAll(_openConnections); + _openConnections.clear(); _server->close(); diff --git a/libsrc/commandline/Parser.cpp b/libsrc/commandline/Parser.cpp index df58fe1f..a2b58765 100644 --- a/libsrc/commandline/Parser.cpp +++ b/libsrc/commandline/Parser.cpp @@ -5,6 +5,7 @@ using namespace commandline; Parser::~Parser() { qDeleteAll(_options); + _options.clear(); } bool Parser::parse(const QStringList &arguments) diff --git a/libsrc/jsonserver/JsonServer.cpp b/libsrc/jsonserver/JsonServer.cpp index 5e77f95c..22937208 100644 --- a/libsrc/jsonserver/JsonServer.cpp +++ b/libsrc/jsonserver/JsonServer.cpp @@ -35,6 +35,7 @@ JsonServer::JsonServer(const QJsonDocument& config) JsonServer::~JsonServer() { qDeleteAll(_openConnections); + _openConnections.clear(); } void JsonServer::initServer()