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 cae69b3a88
commit bfc7c1cd65

View File

@ -186,10 +186,11 @@ var BaseAppView = GObject.registerClass({
// 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