What does it mean "doesn't free memory immediately"? Hours? Days? I never experienced decrease in memory usage, except for small fluctuations. I think it is a memory leak added to this slow garbage collection. I also wrote about this problem to https://gitlab.gnome.org/GNOME/gjs/issues/217# but the guys there suggested me to report a bug here, because they thoght that this is not a garbage collection issue. And it seems to me that gnome-shell or gjs is leaking without the extensions too.
** Bug watch added: gitlab.gnome.org/GNOME/gjs/issues #217 https://gitlab.gnome.org/GNOME/gjs/issues/217 -- 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