Skip to content

Klipper (classic widget): Fix a system tray menu memory leak

Clipboard history item actions are added to the menu by KlipperPopup::rebuild() or PopupProxy::tryInsertItem(). The actions are removed from the menu again at the start of KlipperPopup::rebuild(), but were never deleted.

Without this change, the RSS of the Klipper process increased from 71Mb after startup to 99Mb after about 5,000 clipboard changes and menu rebuilds (automated with a script using DBus and xclip). With this change, the RSS remained at 71Mb even after more than 10,000 menu rebuilds.

Merge request reports