Commit 032a278
Jeronimo Garcia
fix: add dispose() methods to prevent VRAM/GTT memory leaks
Add proper resource cleanup in dispose() methods for several widget classes
to prevent GPU memory (VRAM/GTT) leaks when notifications and media players
are created and destroyed.
Changes:
- Notification: Add dispose() to clear img, img_app_icon, body_image and
remove pending timeouts. Also clear body_image before setting new paintable.
- MprisPlayer: Add dispose() and enhance before_destroy() to cancel downloads
and clear album_art/background_picture textures. Clear textures before
loading new album art.
- Underlay: Add dispose() to properly unparent children.
- NotificationGroup: Add dispose() to skip/null animations and clear collections.
These fixes address GPU memory accumulation observed when:
- Notifications with images are repeatedly shown and dismissed
- MPRIS players update album art frequently
- Notification groups are expanded/collapsed
Fixes potential VRAM/GTT memory leaks in GTK4/Wayland environments.1 parent 2083415 commit 032a278
4 files changed
Lines changed: 123 additions & 0 deletions
File tree
- src
- controlCenter/widgets/mpris
- notificationGroup
- notification
- underlay
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
| |||
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
266 | 282 | | |
267 | 283 | | |
268 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
108 | 124 | | |
109 | 125 | | |
110 | 126 | | |
| |||
344 | 360 | | |
345 | 361 | | |
346 | 362 | | |
| 363 | + | |
| 364 | + | |
347 | 365 | | |
348 | 366 | | |
349 | 367 | | |
| |||
0 commit comments