gnome-shell/js
Sebastian Keller 085102be74 signalTracker: Use WeakMap in SignalManager to avoid leaking objects
The object the SignalTracker belongs to is stored in a map managed by
the SignalManager which keeps a reference to that object. This map is
never destroyed nor is any entry ever removed. This leads to all objects
that ever had SignalTrackers used on them being kept alive even after
all references outside of the SignalTracker are long gone. This then
also extends to other objects which are leaked indirectly through
reference chains from these objects.

And if some of those objects are GObjects, this will prevent them from
being finalized, leaking further resources. A StWidget for example will
not release its shadow textures.

Fix this by using a WeakMap in SignalManager.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5807
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5796
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2450>
2022-08-29 21:53:58 +00:00
..
dbusServices cleanup: Use deepUnpack() intead of deep_unpack() 2022-08-10 10:29:24 +00:00
gdm cleanup: Use deepUnpack() intead of deep_unpack() 2022-08-10 10:29:24 +00:00
misc signalTracker: Use WeakMap in SignalManager to avoid leaking objects 2022-08-29 21:53:58 +00:00
perf cleanup: Use new indentation style for object literals 2022-02-23 12:23:52 +00:00
portalHelper portalHelper: Switch to soup3-based WebKitGTK 2022-06-21 19:29:02 +00:00
ui keyboard: Use the right property to figure out modifiers set size 2022-08-23 18:37:11 +00:00
js-resources.gresource.xml status/power: Merge with system indicator 2022-08-03 12:41:05 +00:00
meson.build extensions-app: Move Extensions app to new subproject 2020-03-27 23:33:30 +00:00
portal-resources.gresource.xml dbusServices: Refactor service utilities from fileUtils into dbusUtils 2022-07-05 03:41:41 -04:00