Commit 92d1e6c
committed
WorkspaceSwitcherPopup: destroy WorkspaceThumbnail objects
WorkspaceThumbnail objects must be explicitly destroy()ed, otherwise
they will not be garbage collected. Furthermore, each such object
subscribes to the "window-{left,entered}-monitor" signal of the
particular MetaDisplay. Thus leaking these thumbnails causes those
signals to have a very large number of subscribers after the popup
has been shown a sufficient number of times. This shows up in profiling,
and also causes stuttering when a window is moved between monitors or created.
For example, with 4*4=16 workspaces on 3 monitors, every time the popup
is shown 48 new subscribers are added to both signals. After a couple
days of uptime, there may be thousands.
Fix that by destroying the WorkspaceThumbnail objects in `_onDestroy()`.1 parent 5b63242 commit 92d1e6c
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
0 commit comments