From 83618f2cfa004accdd1514de7dcbba291aa7e831 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Mon, 26 Feb 2024 15:07:28 -0500 Subject: [Feature #20306] Implement ruby_free_at_exit_p ruby_free_at_exit_p is a way for extensions to determine whether they should free all memory at shutdown. --- include/ruby/vm.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/ruby/vm.h b/include/ruby/vm.h index 3458c28be7..8779780952 100644 --- a/include/ruby/vm.h +++ b/include/ruby/vm.h @@ -49,6 +49,13 @@ int ruby_vm_destruct(ruby_vm_t *vm); */ void ruby_vm_at_exit(void(*func)(ruby_vm_t *)); +/** + * Returns whether the Ruby VM will free all memory at shutdown. + * + * @return true if free-at-exit is enabled, false otherwise. + */ +bool ruby_free_at_exit_p(void); + RBIMPL_SYMBOL_EXPORT_END() #endif /* RUBY_VM_H */ -- cgit v1.2.3