diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2020-11-06 19:01:49 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2020-11-09 16:08:36 -0500 |
commit | 6778ba48fddcab1bca56b9bccc7ea5f9583baba8 (patch) | |
tree | 1e344d08f3f5da4d21a5b1d4d74ce5145a89f237 /class.c | |
parent | 6817f4c6b1ab58d74bab989de984bd1d84be233c (diff) | |
download | ruby-6778ba48fddcab1bca56b9bccc7ea5f9583baba8.tar.gz |
Fix excessive GC rooting
rb_vm_add_root_module() is enough to make sure the object become a GC
root.
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -834,7 +834,6 @@ rb_define_class_id_under(VALUE outer, ID id, VALUE super) rb_const_set(outer, id, klass); rb_class_inherited(super, klass); rb_vm_add_root_module(klass); - rb_gc_register_mark_object(klass); return klass; } @@ -872,7 +871,6 @@ rb_define_module(const char *name) } module = rb_define_module_id(id); rb_vm_add_root_module(module); - rb_gc_register_mark_object(module); rb_const_set(rb_cObject, id, module); return module; |