From e3fc9756069c86a88e0c32777e7c92048399dc45 Mon Sep 17 00:00:00 2001 From: songwentao Date: Thu, 20 Jan 2022 17:50:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=B8=80=E5=A4=84?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E9=9C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发现一处内存泄露 Log: Influence: 无 Task: https://pms.uniontech.com/zentao/task-view-98624.html Change-Id: I79b86d9de75d4722f16ddf88366b95847b4765dd --- plugins/bluetooth/componments/adaptersmanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/bluetooth/componments/adaptersmanager.cpp b/plugins/bluetooth/componments/adaptersmanager.cpp index 34e65e13d..a596189fd 100644 --- a/plugins/bluetooth/componments/adaptersmanager.cpp +++ b/plugins/bluetooth/componments/adaptersmanager.cpp @@ -65,11 +65,11 @@ AdaptersManager::AdaptersManager(QObject *parent) }); #endif - QDBusInterface *inter = new QDBusInterface("com.deepin.daemon.Bluetooth", - "/com/deepin/daemon/Bluetooth", - "com.deepin.daemon.Bluetooth", - QDBusConnection::sessionBus()); - QDBusReply reply = inter->call(QDBus::Block, "GetAdapters"); + QDBusInterface inter("com.deepin.daemon.Bluetooth", + "/com/deepin/daemon/Bluetooth", + "com.deepin.daemon.Bluetooth", + QDBusConnection::sessionBus()); + QDBusReply reply = inter.call(QDBus::Block, "GetAdapters"); const QString replyStr = reply.value(); QJsonDocument doc = QJsonDocument::fromJson(replyStr.toUtf8()); QJsonArray arr = doc.array();