[gnome-shell] background: Use Garbage Collector to dispose background
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: Use Garbage Collector to dispose background
- Date: Fri, 14 Jun 2019 12:41:26 +0000 (UTC)
commit a9234f7631f2228184d027419cab1350666ffdc1
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon May 27 23:03:17 2019 -0500
background: Use Garbage Collector to dispose background
The same Meta.Background could be used by multiple instances of background
actors, and so should not be disposed when the actor using it is destroyed.
Instead of calling `run_dispose` directly on it, just nullify the reference
on destroy method, leaving the job of doing the proper disposition to the
gabage collector that keeps the proper reference count on the Meta.Background.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/501
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/558
js/ui/background.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 06e038816..d107fee1b 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -265,6 +265,8 @@ var Background = class Background {
}
destroy() {
+ this.background = null;
+
this._cancellable.cancel();
this._removeAnimationTimeout();
@@ -699,7 +701,6 @@ var BackgroundManager = class BackgroundManager {
time: FADE_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete() {
- oldBackgroundActor.background.run_dispose();
oldBackgroundActor.destroy();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]