From 63d03afb9580f9a1a0c0c6a2ac18fa24674d3f6a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 28 Oct 2019 13:35:41 +0100 Subject: [PATCH] LanguageClient: fix memory leak When removing actions from a widget the action is not magically deleted, so manually delete the language client toolbar action of the editor after the last client was shutdown. Change-Id: I6a5a079d4a44724f92d291040925df73f7eb747b Reviewed-by: Christian Stenger --- src/plugins/languageclient/languageclientutils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/languageclient/languageclientutils.cpp b/src/plugins/languageclient/languageclientutils.cpp index c476aaabcfe..22c43650ee5 100644 --- a/src/plugins/languageclient/languageclientutils.cpp +++ b/src/plugins/languageclient/languageclientutils.cpp @@ -213,6 +213,7 @@ void updateEditorToolBar(Core::IEditor *editor) } else { widget->toolBar()->removeAction(action); actions.remove(widget); + delete action; } } else if (client) { const QIcon icon = Utils::Icon({{":/languageclient/images/languageclient.png",