9d933356e1
When the keyboard is destroyed, we destroy the keyboard actor, but the keyboard's menu isn't part of the key itself, so it's never tracked. The menus are actually tracked actors, so they slow down the layout manager's code to rebuild regions and other things. Keeping this list small is a good idea. To prevent leaking menus, destroy the menu when the key is destroyed. https://bugzilla.gnome.org/show_bug.cgi?id=736999