diff options
author | Daniel MartÃn <mardani29@yahoo.es> | 2022-07-10 22:36:28 +0200 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-07-11 18:21:43 +0800 |
commit | 7ae7a95e803aa898d31673d552f254092ce202b1 (patch) | |
tree | 1803da41d924d1e7e9f0ce6010fd99cbe82a4118 /src/nsterm.h | |
parent | bebf39f292f1963ab980497248a18d8035708d1a (diff) | |
download | emacs-7ae7a95e803aa898d31673d552f254092ce202b1.tar.gz |
Fix memory leak in ns_draw_relief
* src/nsterm.h (struct ns_output): New fields to store the relief
colors.
* src/nsterm.m (ns_setup_relief_colors): New function to keep the
relief colors as part of the ns_output structure.
(ns_draw_relief): Remove static local variables. Assigning them to
nil caused a memory leak of NSColor instances (bug#56462). Call
ns_setup_relief_colors instead.
Diffstat (limited to 'src/nsterm.h')
-rw-r--r-- | src/nsterm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nsterm.h b/src/nsterm.h index 7a097b32489..2a4c7571a34 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -927,6 +927,9 @@ struct ns_output NSColor *cursor_color; NSColor *foreground_color; NSColor *background_color; + NSColor *relief_background_color; + NSColor *light_relief_color; + NSColor *dark_relief_color; EmacsToolbar *toolbar; #else void *view; @@ -934,6 +937,9 @@ struct ns_output void *cursor_color; void *foreground_color; void *background_color; + void *relief_background_color; + void *light_relief_color; + void *dark_relief_color; void *toolbar; #endif |