gnome-shell (via gjs and mozjs) actually doesn't free memory immediately when JavaScript objects get deleted. It defers the garbage collection until more stress (more memory use) is put on the system.
What this means is even without any leaks it will appear to grow for some period of time before shrinking again. So you might have a leak here, but also it will look like it's leaking even when it's not in the long term :( -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-shell in Ubuntu. https://bugs.launchpad.net/bugs/1850201 Title: Memory usage grows when locking/unlocking the screen Status in gnome-shell package in Ubuntu: New Bug description: Many times after logging in gnome-shell uses 600-800kB of memory, and also slows down quite a bit (e.g., 20-30 seconds waiting for login). Only after multiple resets (Alt+F2 r) drops the memory usage below 200kB. I use my computer mainly for work, and the above phenomenon is quite disturbing. After a couple of hours of work memory usage is growing over 400kB again, and sometimes the reset (Alt+F2 r) doesn't help either. My system is Ubuntu 18.04.3 Gnome 3.28.2, but the newest Ubuntu also behaves similarly. This is an old issue, it was present in 18.04, 18.10, 19.04 and now in 19.10. I use three computers, and all of them suffer with this problem. Anyone can check this with the "gnome-shell memory monitor" gnome-shell extension. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: gnome-shell 3.28.4-0ubuntu18.04.2 ProcVersionSignature: Ubuntu 5.0.0-32.34~18.04.2-generic 5.0.21 Uname: Linux 5.0.0-32-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 CurrentDesktop: communitheme:ubuntu:GNOME Date: Mon Oct 28 20:28:38 2019 DisplayManager: gdm3 InstallationDate: Installed on 2019-01-04 (297 days ago) InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725) SourcePackage: gnome-shell UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1850201/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp