diff options
| author | Kenny Daniel <platypii@gmail.com> | 2026-04-13 00:17:32 -0700 |
|---|---|---|
| committer | Kenny Daniel <platypii@gmail.com> | 2026-04-13 00:21:02 -0700 |
| commit | 8880ce63d6c1c02c08f1ae4e8023ac99a7533810 (patch) | |
| tree | f775961832906a4717b01754b733222ea856f164 /debian/source | |
| parent | 08c5540e36fbd92d48ea3cc5b4ea4e8731c05a96 (diff) | |
| download | libayatana-indicator-8880ce63d6c1c02c08f1ae4e8023ac99a7533810.tar.gz libayatana-indicator-8880ce63d6c1c02c08f1ae4e8023ac99a7533810.tar.bz2 libayatana-indicator-8880ce63d6c1c02c08f1ae4e8023ac99a7533810.zip | |
src/indicator-ng.c: Fix GtkCssProvider memory leak in indicator_ng_set_label
indicator_ng_set_label() created a new GtkCssProvider and added it to
the label's GtkStyleContext on every call, without removing old ones.
gtk_style_context_add_provider() accumulates providers, so each call
leaked a provider (~1 KB).
Since ayatana-indicator-datetime sends action-state-changed once per
second to update the clock label, this leaked ~86,400 providers/day,
causing mate-indicator-applet-complete to accumulate ~1.4 GB RSS over
7 days.
Fix by storing a single GtkCssProvider in the IndicatorNg struct and
reusing it. The provider is created on first use and cleaned up in
dispose.
Test results (100,000 iterations of set_label):
Before fix: +99,692 KB RSS growth
After fix: +0 KB RSS growth
Diffstat (limited to 'debian/source')
0 files changed, 0 insertions, 0 deletions
