Diffusion KIO 213ed50634c0

Fix memory leak in KUrlNavigatorPlacesSelector::updateMenu

Authored by fvogt on Jan 29 2020, 6:50 PM.

Description

Fix memory leak in KUrlNavigatorPlacesSelector::updateMenu

Summary:
This method gets called each time solid notices a change, which can in some
setups be very frequent. It leaked memory as the submenus and their actions
were not deallocated properly.

Test Plan: Builds. User feedback: "so far so good, 160 MB Memory usage". It was ~7GiB before this patch.

Reviewers: Frameworks, davidedmundson, meven

Reviewed By: davidedmundson, meven

Subscribers: anthonyfieroni, meven, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D27002