[gnome-shell] appDisplay: Fix leaking signal connections
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] appDisplay: Fix leaking signal connections
- Date: Wed, 4 Mar 2015 11:56:56 +0000 (UTC)
commit 99af774c9805a47973e40947246c2d9bdd29330f
Author: Michele <micxgx gmail com>
Date: Wed Mar 4 00:51:19 2015 +0000
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 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 9f50558..1df417f 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1702,7 +1702,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]