aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/terminal.c11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4fa19d98f7f..fc4ad207993 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * terminal.c (initial_free_frame_resources): New function.
4 (init_initial_terminal): Install new hook to free face cache
5 on initial frame and avoid memory leak. For details, see
6 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
7
12014-01-26 Paul Eggert <eggert@cs.ucla.edu> 82014-01-26 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 * data.c (Fstring_to_number): Document results if unparsable 10 * data.c (Fstring_to_number): Document results if unparsable
diff --git a/src/terminal.c b/src/terminal.c
index 15e7e8a4474..d0a38b97bb4 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -500,7 +500,15 @@ selected frame's terminal). */)
500 return store_terminal_param (t, parameter, value); 500 return store_terminal_param (t, parameter, value);
501} 501}
502 502
503 503/* Initial frame has no device-dependent output data, but has
504 face cache which should be freed when the frame is deleted. */
505
506static void
507initial_free_frame_resources (struct frame *f)
508{
509 eassert (FRAME_INITIAL_P (f));
510 free_frame_faces (f);
511}
504 512
505/* Create the bootstrap display terminal for the initial frame. 513/* Create the bootstrap display terminal for the initial frame.
506 Returns a terminal of type output_initial. */ 514 Returns a terminal of type output_initial. */
@@ -516,6 +524,7 @@ init_initial_terminal (void)
516 initial_terminal->name = xstrdup ("initial_terminal"); 524 initial_terminal->name = xstrdup ("initial_terminal");
517 initial_terminal->kboard = initial_kboard; 525 initial_terminal->kboard = initial_kboard;
518 initial_terminal->delete_terminal_hook = &delete_initial_terminal; 526 initial_terminal->delete_terminal_hook = &delete_initial_terminal;
527 initial_terminal->delete_frame_hook = &initial_free_frame_resources;
519 /* All other hooks are NULL. */ 528 /* All other hooks are NULL. */
520 529
521 return initial_terminal; 530 return initial_terminal;