Mercurial > hg > octave-lojdl
changeset 14073:5cbc978a27e8 stable
close all figures before closing all files (bug #35064)
* toplev.cc (do_octave_atexit): Perform all clean up actions here
instead of in clean_up_and_exit. Close all figures before closing all
files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 19 Dec 2011 22:01:10 -0500 |
parents | d0d9c5d2e434 |
children | f90c3facfac3 |
files | src/toplev.cc |
diffstat | 1 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -669,20 +669,6 @@ { do_octave_atexit (); - OCTAVE_SAFE_CALL (gh_manager::close_all_figures, ()); - - OCTAVE_SAFE_CALL (gtk_manager::unload_all_toolkits, ()); - - OCTAVE_SAFE_CALL (symbol_table::cleanup, ()); - - OCTAVE_SAFE_CALL (cleanup_parser, ()); - - OCTAVE_SAFE_CALL (sysdep_cleanup, ()); - - OCTAVE_SAFE_CALL (singleton_cleanup_list::cleanup, ()); - - OCTAVE_SAFE_CALL (octave_chunk_buffer::clear, ()); - if (octave_exit) (*octave_exit) (retval == EOF ? 0 : retval); } @@ -1070,10 +1056,20 @@ if (! command_history::ignoring_entries ()) OCTAVE_SAFE_CALL (command_history::clean_up_and_save, ()); + OCTAVE_SAFE_CALL (gh_manager::close_all_figures, ()); + + OCTAVE_SAFE_CALL (gtk_manager::unload_all_toolkits, ()); + OCTAVE_SAFE_CALL (close_files, ()); OCTAVE_SAFE_CALL (cleanup_tmp_files, ()); + OCTAVE_SAFE_CALL (symbol_table::cleanup, ()); + + OCTAVE_SAFE_CALL (cleanup_parser, ()); + + OCTAVE_SAFE_CALL (sysdep_cleanup, ()); + OCTAVE_SAFE_CALL (flush_octave_stdout, ()); if (! quitting_gracefully && (interactive || forced_interactive)) @@ -1085,6 +1081,10 @@ OCTAVE_SAFE_CALL (flush_octave_stdout, ()); } + + OCTAVE_SAFE_CALL (singleton_cleanup_list::cleanup, ()); + + OCTAVE_SAFE_CALL (octave_chunk_buffer::clear, ()); } }