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:
parent
284d821233
commit
3c1f389e25
@ -55,4 +55,10 @@ function addBackgroundMenu(actor) {
|
|||||||
openMenu();
|
openMenu();
|
||||||
});
|
});
|
||||||
actor.add_action(clickAction);
|
actor.add_action(clickAction);
|
||||||
|
|
||||||
|
actor.connect('destroy', function() {
|
||||||
|
actor._backgroundMenu.destroy();
|
||||||
|
actor._backgroundMenu = null;
|
||||||
|
actor._backgroundManager = null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user