
Issue #20306 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to peterzhu2118 (Peter Zhu) Discussed at the dev meeting, and @matz said "go ahead". ---------------------------------------- Feature #20306: Add rb_free_at_exit_p https://bugs.ruby-lang.org/issues/20306#change-107238 * Author: peterzhu2118 (Peter Zhu) * Status: Assigned * Assignee: peterzhu2118 (Peter Zhu) ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/10104 From ticket [#20290](https://bugs.ruby-lang.org/issues/20290#note-6), I found that C extensions could use ruby_vm_at_exit to register hooks to free memory at shutdown. However, they cannot determine whether they should free all memory during shutdown to mirror the behavior of Ruby when RUBY_FREE_AT_EXIT is set. This ticket proposes a new API called rb_free_at_exit_p that returns true when RUBY_FREE_AT_EXIT is set, and false otherwise. -- https://bugs.ruby-lang.org/