From eab8ea9a1eaa9e8e5e7c5d8cd9a2e3155e76757f Mon Sep 17 00:00:00 2001 From: Michele Date: Wed, 4 Mar 2015 00:51:19 +0000 Subject: [PATCH] appDisplay: Fix leaking signal connections The overview has a longer life-time than dash items, so we are leaking a signal connection each time an item is destroyed. https://bugzilla.gnome.org/show_bug.cgi?id=745570 --- js/ui/appDisplay.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 4a126981b..ae40f3e90 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1658,7 +1658,10 @@ const AppIcon = new Lang.Class({ if (!isPoppedUp) this._onMenuPoppedDown(); })); - Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); + let id = Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); })); + this.actor.connect('destroy', function() { + Main.overview.disconnect(id); + }); this._menuManager.addMenu(this._menu); }