mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Free everything at shutdown
when the RUBY_FREE_ON_SHUTDOWN environment variable is set, manually free memory at shutdown. Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Peter Zhu <peter@peterzhu.ca>
This commit is contained in:
parent
b361a800c2
commit
6816e8efcf
27 changed files with 285 additions and 6 deletions
8
error.c
8
error.c
|
@ -2693,6 +2693,14 @@ syntax_error_with_path(VALUE exc, VALUE path, VALUE *mesg, rb_encoding *enc)
|
|||
|
||||
static st_table *syserr_tbl;
|
||||
|
||||
void
|
||||
rb_free_warning(void)
|
||||
{
|
||||
st_free_table(warning_categories.id2enum);
|
||||
st_free_table(warning_categories.enum2id);
|
||||
st_free_table(syserr_tbl);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
set_syserr(int n, const char *name)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue