aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/top.c b/gdb/top.c
index afb77c0..1fc259f 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1673,6 +1673,12 @@ quit_force (int *exit_arg, int from_tty)
}
END_CATCH
+ /* Destroy any values currently allocated now instead of leaving it
+ to global destructors, because that may be too late. For
+ example, the destructors of xmethod values call into the Python
+ runtime, which is finalized via a final cleanup. */
+ finalize_values ();
+
/* Do any final cleanups before exiting. */
TRY
{