# HG changeset patch # User John W. Eaton # Date 1644693607 18000 # Node ID 7ee1ec5753c15c99df2bfbed87a94bcb23f50655 # Parent 4335606e41aca8580a39f24dc327f93e02bce123# Parent dadbfe6fddd6d68a46ea1831ec0f7fa24159c25b maint: Merge stable to default. diff -r 4335606e41ac -r 7ee1ec5753c1 libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Thu Feb 10 09:17:46 2022 +0100 +++ b/libinterp/corefcn/interpreter.cc Sat Feb 12 14:20:07 2022 -0500 @@ -653,8 +653,6 @@ interpreter::~interpreter (void) { - shutdown (); - delete m_gh_manager; } @@ -853,7 +851,11 @@ exit_status = status; if (! options.persist ()) - return exit_status; + { + shutdown (); + + return exit_status; + } } // If there is an extra argument, see if it names a file to @@ -868,7 +870,11 @@ exit_status = status; if (! options.persist ()) - return exit_status; + { + shutdown (); + + return exit_status; + } } if (options.forced_interactive ()) @@ -906,6 +912,8 @@ exit_status = xe.exit_status (); } + shutdown (); + return exit_status; } diff -r 4335606e41ac -r 7ee1ec5753c1 libinterp/corefcn/interpreter.h --- a/libinterp/corefcn/interpreter.h Thu Feb 10 09:17:46 2022 +0100 +++ b/libinterp/corefcn/interpreter.h Sat Feb 12 14:20:07 2022 -0500 @@ -166,8 +166,6 @@ int execute (void); - void shutdown (void); - bool server_mode (void) const { return m_evaluator.server_mode (); } bool interactive (void) const @@ -554,6 +552,8 @@ int server_loop (void); + void shutdown (void); + void execute_atexit_fcns (void); void maximum_braindamage (void);