gnome-shell/js/misc
Sebastian Keller 91ce5ca960 signalTracker: Remove SignalTracker after its last signal got untracked
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 destroying the SignalTracker and removing it from the
SignalManager once the last signal it was tracking has been untracked.

A WeakMap could have been used as well, but we need the Map to be
iterable in some of the following changes.

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/2466>
2022-09-03 15:11:46 +00:00
..
config.js.in config: Check for new required GnomeBluetooth API 2022-09-03 15:05:57 +00:00
dbusUtils.js dbusServices: Refactor service utilities from fileUtils into dbusUtils 2022-07-05 03:41:41 -04:00
extensionUtils.js extensionUtils: Add utility for setting the current extension 2022-07-06 13:40:44 -04:00
fileUtils.js dbusServices: Refactor service utilities from fileUtils into dbusUtils 2022-07-05 03:41:41 -04:00
gnomeSession.js endSessionDialog: Only show logout inhibiting apps 2021-02-24 15:31:03 +00:00
history.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00
ibusManager.js ibusManager: Add OSK completion mode 2022-08-10 17:11:26 +00:00
inputMethod.js keyboard: Use extended US keyboard for terminal mode 2022-08-10 17:11:26 +00:00
introspect.js introspect: Add WindowsChanged signal 2022-03-08 16:31:20 +00:00
jsParse.js cleanup: Remove empty leading/trailing lines in blocks 2020-11-16 18:04:23 +00:00
keyboardManager.js keyboard: Fix display keyboard layout crash with some input methods 2021-03-29 09:33:45 +00:00
loginManager.js cleanup: Use deepUnpack() intead of deep_unpack() 2022-08-10 10:29:24 +00:00
meson.build config: Check runtime dependencies at runtime 2022-05-20 12:00:22 +00:00
modemManager.js cleanup: Use deepUnpack() intead of deep_unpack() 2022-08-10 10:29:24 +00:00
objectManager.js objectManager: Simplify fetching of remote objects 2022-08-01 18:51:14 +00:00
params.js cleanup: Only omit braces for single-line blocks 2019-11-11 19:25:14 +00:00
parentalControlsManager.js parentalControlsManager: Be less verbose on the logs 2022-02-18 22:05:16 +00:00
permissionStore.js cleanup: Mark globals used from other modules as exported 2019-07-24 00:28:45 +02:00
signals.js Adopt EventEmitter class instead of injecting Signal methods 2022-07-04 18:30:49 -04:00
signalTracker.js signalTracker: Remove SignalTracker after its last signal got untracked 2022-09-03 15:11:46 +00:00
smartcardManager.js cleanup: Minimize deep_unpack() usage 2022-08-10 10:29:24 +00:00
systemActions.js loginManager: Return objects instead of multiple booleans 2022-08-01 20:58:37 +02:00
util.js js: Use (dis)connectObject() 2022-03-04 14:14:37 +00:00
weather.js cleanup: Use deepUnpack() intead of deep_unpack() 2022-08-10 10:29:24 +00:00