# HG changeset patch # User Chong Yidong # Date 1229027916 0 # Node ID b6b22701e97c4bbdd5c80873e88844c82826955d # Parent 3b103f43d3f618d24a2fe050ceba1ba67515ab8f (tty_free_frame_resources): Renamed from delete_tty_output; all callers changed. Call free_frame_faces to free the face cache. diff -r 3b103f43d3f6 -r b6b22701e97c src/term.c --- a/src/term.c Thu Dec 11 20:38:26 2008 +0000 +++ b/src/term.c Thu Dec 11 20:38:36 2008 +0000 @@ -3183,14 +3183,17 @@ f->output_data.tty = t; } -/* Delete the tty-dependent part of frame F. */ +/* Delete frame F's face cache, and its tty-dependent part. */ static void -delete_tty_output (struct frame *f) +tty_free_frame_resources (struct frame *f) { if (! FRAME_TERMCAP_P (f)) abort (); + if (FRAME_FACE_CACHE (f)) + free_frame_faces (f); + xfree (f->output_data.tty); } @@ -3229,7 +3232,7 @@ /* Leave these two set, or suspended frames are not deleted correctly. */ - terminal->delete_frame_hook = &delete_tty_output; + terminal->delete_frame_hook = &tty_free_frame_resources; terminal->delete_terminal_hook = &delete_tty; } @@ -3273,7 +3276,7 @@ terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */ terminal->frame_up_to_date_hook = 0; /* Not needed. */ - terminal->delete_frame_hook = &delete_tty_output; + terminal->delete_frame_hook = &tty_free_frame_resources; terminal->delete_terminal_hook = &delete_tty; } @@ -3452,7 +3455,7 @@ tty->output = stdout; tty->input = stdin; /* The following two are inaccessible from w32console.c. */ - terminal->delete_frame_hook = &delete_tty_output; + terminal->delete_frame_hook = &tty_free_frame_resources; terminal->delete_terminal_hook = &delete_tty; tty->name = xstrdup (name);