mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[Feature #18290] Remove all usages of rb_gc_force_recycle
This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult.
This commit is contained in:
parent
aa5bccfc65
commit
aeae6e2842
Notes:
git
2021-11-09 04:06:17 +09:00
11 changed files with 12 additions and 28 deletions
8
array.c
8
array.c
|
@ -514,13 +514,9 @@ rb_ary_decrement_share(VALUE shared_root)
|
|||
{
|
||||
if (shared_root) {
|
||||
long num = ARY_SHARED_ROOT_REFCNT(shared_root) - 1;
|
||||
if (num == 0) {
|
||||
rb_ary_free(shared_root);
|
||||
rb_gc_force_recycle(shared_root);
|
||||
}
|
||||
else if (num > 0) {
|
||||
if (num > 0) {
|
||||
ARY_SET_SHARED_ROOT_REFCNT(shared_root, num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue