[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-
From: |
Eli Zaretskii |
Subject: |
bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list |
Date: |
Sun, 07 Apr 2019 09:37:29 +0300 |
User-agent: |
K-9 Mail for Android |
On April 7, 2019 8:16:53 AM GMT+03:00, Alex <agrambot@gmail.com> wrote:
> Also declare `name' in MonitorInfo const to satisfy the compiler.
>
> Is it too late to push a memory leak fix like this to emacs-26?
Yes, it's too late for such non-trivial changes in Emacs 26.2.
But I have a more fundamental problem with your proposed patch: it looks like
you are relying on implementation details of gdk_monitor_get_model that its
documentation never advertises? Otherwise, how did you know that just removing
the g_strdup call will plug a memory leak here, and will not create any new
problems?
I'd prefer to leave g_strdup intact, and instead explicitly release the storage
of previous value. IOW, plug the leak in our own code, not rely on
undocumented features which can easily go away some day.
Thanks.
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Alex, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list,
Eli Zaretskii <=
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Alex, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Eli Zaretskii, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Alex, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Alex, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Eli Zaretskii, 2019/04/07
- bug#35179: [PATCH] Plug memory leak in GTK x-display-monitor-attributes-list, Alex, 2019/04/07