backgroundMenu: destroy menu when actor is destroyed

This fixes a leak.

https://bugzilla.gnome.org/show_bug.cgi?id=697119
This commit is contained in:
Ray Strode 2013-04-01 23:57:55 -04:00
parent 284d821233
commit 3c1f389e25

View File

@ -55,4 +55,10 @@ function addBackgroundMenu(actor) {
openMenu();
});
actor.add_action(clickAction);
actor.connect('destroy', function() {
actor._backgroundMenu.destroy();
actor._backgroundMenu = null;
actor._backgroundManager = null;
});
}