baseAppView: Destroy icon when removing

We cannot rely on the garbage collector to do that in a timely
manner, so destroy it explicitly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/841
This commit is contained in:
Georges Basile Stavracas Neto 2019-11-21 18:21:44 -03:00
parent 59daa4192c
commit b88f7d0655

View File

@ -173,10 +173,11 @@ class BaseAppView {
// Remove old app icons
removedApps.forEach(icon => {
let iconIndex = this._allItems.indexOf(icon);
let id = icon.id;
this._allItems.splice(iconIndex, 1);
this._grid.removeItem(icon);
delete this._items[icon.id];
icon.destroy();
delete this._items[id];
});
// Add new app icons